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

vars promises do not emit proper BEGIN promise in verbose logs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: (None)
    • Resolution: Unresolved
    • Affects Version/s: 3.18.0
    • Fix Version/s: None
    • Component/s: cf-agent, Logging
    • Labels:
      None

      Description

      I looked at verbose output to prove how normal order is applied, but I was not able to make a simple illustration because of inconsistent logging.

      A simple example with promises written against normal order with handles expected to easily identify the promises in the logs to reproduce:

        bundle agent main
        {
          reports:
              "The message is '$(msg)'"
                handle => "MARK1";
        
          vars:
              "msg"
                string => "Hello",
                handle => "MARK2";
        }
      
      R: The message is 'Hello'
      

      Run the example:

        cf-agent -Kvf ./writing_in_normal_order_is_not_required.cf | grep -P "BEGIN"
      
      verbose: BEGIN parsing file: ./writing_in_normal_order_is_not_required.cf
      verbose: BEGIN Discovered hard classes:
      verbose: B: BEGIN bundle main
      verbose: V: BEGIN variables (pass 1)
      verbose: P: BEGIN promise 'MARK1' of type "reports" (pass 1)
      verbose: V: BEGIN variables (pass 2)
      verbose: V: BEGIN variables (pass 3)
      

      I think I should see "verbose: V: BEGIN promise 'MARK2' of type "vars" (pass 1)", but alas, I do not (even if I pass --log-modules=all).

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            a10042 Nick Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: