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

$(this.promiser) is not expanded correctly in a copy_from body

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Rejected
    • Priority: (None)
    • Resolution: Done
    • Affects Version/s: 3.12.1
    • Fix Version/s: None
    • Component/s: cf-agent
    • Labels:
      None
    • Platform:
      Debian
    • Found in version (details):
      Debian package 3.12.1-2

      Description

      This is a bit tricky: $(this.promiser) does not expand correctly when in a parameterized copy_from body that is invoked inside a usebundle.

      body copy_from with_param(param)
      {
          source => "$(this.promiser)";
      }
      body copy_from no_param
      {
          source => "$(this.promiser)";
      }
      bundle agent test
      {
        files:
          'result: ok' copy_from => no_param;
          'result: ok' copy_from => with_param('');
      }
      bundle agent test2
      {
        methods:
          'result: FAILED' usebundle => 'test';
      }
      
      $ bin/cf-agent -KIb test test.cf
      info: Using command line specified bundlesequence
      info: Can't stat file 'result: ok' on 'localhost' in files.copy_from promise
      info: Can't stat file 'result: ok' on 'localhost' in files.copy_from promise
      $ bin/cf-agent -KIb test2 test.cf
      info: Using command line specified bundlesequence
      info: Can't stat file 'result: ok' on 'localhost' in files.copy_from promise
      info: Can't stat file 'result: FAILED' on 'localhost' in files.copy_from promise
      error: Method 'test' failed in some repairs
      

      In the failed test, $(this.promiser) expands to the previous promiser.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10042 Nick Anderson
                Reporter:
                gpiero Gian Piero Carrubba
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel