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

this.promiser should be expanded in a promise handle emitted in verbose logs

    XMLWordPrintable

    Details

      Description

      It seems that $(this.promiser) is getting out of sync with the actual promise, or not getting consistently set on the second and third passes through a list of file promises. Everything works as expected in the attached demo bundle, but on the second and third pass, $this.promiser sometimes points at the promiser from the previous execution, or sometimes is correct. Further, in the files: promise types, the $(this.promiser) variable either isn't available to the handle attribute, or is not canonified if it is available. That might be a separate bug report, though.

      This behavior is consistent in the released 3.4.4 and in a locally-compiled CFEngine Core 3.5.0b2.d4e7539, both on CentOS 6.4.

      <pre>
      cf3> =========================================================
      cf3> files in bundle example (2)
      cf3> =========================================================
      cf3>
      cf3>
      cf3> .........................................................
      cf3> Promise's handle: size_check_$(this.promiser)
      cf3> Promise made by: "/tmp/file1"
      cf3>
      cf3> Comment: Comment on /tmp/file1
      cf3> .........................................................
      cf3>
      cf3> -> Using literal pathtype for /tmp/file1
      cf3> -> This promise has already been verified
      cf3>
      cf3> .........................................................
      cf3> Promise's handle: size_check_/tmp/file1
      cf3> Promise made by: "/tmp/file2"
      cf3>
      cf3> Comment: Comment on /tmp/file1
      cf3> .........................................................
      cf3>
      cf3> -> Using literal pathtype for /tmp/file2
      cf3> -> File "/tmp/file2" exists as promised
      cf3> -> Handling file existence constraints on /tmp/file2
      cf3> -> Handling file existence constraints on /tmp/file2
      cf3>
      cf3> .........................................................
      cf3> Promise's handle: size_check_$(this.promiser)
      cf3> Promise made by: "/tmp/file3"
      cf3>
      cf3> Comment: Comment on /tmp/file3
      cf3> .........................................................
      cf3>
      cf3> -> Using literal pathtype for /tmp/file3
      cf3> -> This promise has already been verified
      cf3>
      cf3> .........................................................
      cf3> Promise's handle: size_check_/tmp/file3
      cf3> Promise made by: "/tmp/file4"
      cf3>
      cf3> Comment: Comment on /tmp/file3
      cf3> .........................................................
      cf3>
      cf3> -> Using literal pathtype for /tmp/file4
      cf3> -> File "/tmp/file4" exists as promised
      cf3> -> Handling file existence constraints on /tmp/file4
      cf3> -> Handling file existence constraints on /tmp/file4
      cf3>
      cf3> .........................................................
      cf3> Promise's handle: size_check_$(this.promiser)
      cf3> Promise made by: "/tmp/file5"
      cf3>
      cf3> Comment: Comment on /tmp/file5
      cf3> .........................................................
      cf3>
      cf3> -> Using literal pathtype for /tmp/file5
      cf3> -> This promise has already been verified
      </pre>

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            dannysauer Danny Sauer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: