Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2370

Right hand Expression skip when evaluate class

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Rejected
    • Priority: Medium
    • Resolution: Won't Do
    • Affects Version/s: 3.7.3
    • Fix Version/s: None
    • Component/s: Evaluation
    • Labels:
      None

      Description

      In some cases (when using several methods to call same bundle) class evaluation has skipping right hand expression check and static class could be set to the next iteration.

      Verbose output:
      1) Correct class evaluation at the first bundle call with arg instance1
      verbose: V: BEGIN variables (pass 1)
      verbose: V: .........................................................
      verbose: V: Computing value of "fullversion[instance1]"
      verbose: V: Computing value of "fullversion[instance2]"
      verbose: V: Computing value of "fullversion[instance3]"
      verbose: V: Computing value of "fullversion[instance4]"
      verbose: C: .........................................................
      verbose: C: BEGIN classes / conditions (pass 1)
      verbose: C: .........................................................
      verbose: C: + Private class: split_version
      verbose: Skipping promise '$ : $(fullversion[$(i)]) : class create_something detected', for if/ifvarclass is not in scope
      verbose: V: .........................................................
      verbose: V: BEGIN variables (pass 2)
      verbose: V: .........................................................
      verbose: V: Computing value of "fullversion[instance1]"
      verbose: V: Computing value of "fullversion[instance2]"
      verbose: V: Computing value of "fullversion[instance3]"
      verbose: V: Computing value of "fullversion[instance4]"
      verbose: V: Computing value of "version_first_octet"
      verbose: V: Computing value of "version_second_octet"
      verbose: V: Computing value of "version_third_octet"
      verbose: C: .........................................................
      verbose: C: BEGIN classes / conditions (pass 2)
      verbose: C: .........................................................
      verbose: Skipping evaluation of classes promise as class 'split_version' is already set
      verbose: C: + Private class: create_something

      2) Incorrect class evaluation during second bundle call with arg instance2 (here you can see ingnoring of right hand expression of class "create_something"):

      verbose: B: BEGIN bundle lowcall(

      {'instance2'})
      verbose: B: *****************************************************************
      verbose: V: + Private parameter: 'i' in scope 'lowcall' (type: s) in pass 3
      verbose: V: .........................................................
      verbose: V: BEGIN variables (pass 1)
      verbose: V: .........................................................
      verbose: V: Computing value of "fullversion[instance1]"
      verbose: V: Computing value of "fullversion[instance2]"
      verbose: V: Computing value of "fullversion[instance3]"
      verbose: V: Computing value of "fullversion[instance4]"
      verbose: C: .........................................................
      verbose: C: BEGIN classes / conditions (pass 1)
      verbose: C: .........................................................
      verbose: C: + Private class: split_version
      verbose: C: + Private class: create_something
      verbose: P: .........................................................
      verbose: P: BEGIN un-named promise of type "reports" (pass 1)
      verbose: P: Promiser/affected object: 'instance2 : 1.2.3.1.9999 : class create_'
      verbose: P: From parameterized bundle: lowcall( {'instance2'}

      )
      verbose: P: Base context class: any
      verbose: P: "if" class condition: create_something
      verbose: P: Container path : '/default/llclass/methods/'call'/default/lowcall/reports/'instance2 : 1.2.3.1.9999 : class create_something detected'[0]'
      verbose: P: .........................................................
      verbose:

      Code to reproduce attached to ticket

        Attachments

          Activity

            People

            • Assignee:
              a10042 Nick Anderson
              Reporter:
              manepekoc manepekoc
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel