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

Multiple calls of usebundle with data containers result in some unresolved variables

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Rejected
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.0
    • Component/s: Promise type: methods
    • Labels:
      None
    • Platform:
      Any

      Description

      In the following bundle (also attached):

      <pre>
      bundle agent test
      {
      vars:
      "json1" data => parsejson('

      { "zero": "0", "more": ["hello","test"] }

      ');

      "packageinfo" data => parsejson('

      { "name": "php", "old_version": "5.3.3-27.el6_5", "new_version": "5.3.3-26.el6", "reinstall_list": ["php", "php-common", "php-cli"] }

      ');

      methods:
      one::
      "print_json" usebundle => show(@(json1));

      two::
      "again" usebundle => show(@(packageinfo));
      }

      bundle agent show(data)
      {
      reports:
      one::
      "zero: $(data[zero])";
      "more: $(data[more])";

      two::
      "package: $(data[reinstall_list])";
      }
      </pre>

      Using multiple usebundle calls, gives me a list of unexpanded variables. Please see the following sequence of outputs:

      [root@hub ]# cf-agent ./test_container.cf -b test -K -Done
      R: zero: 0 <<== this is expected
      R: more: hello
      R: more: test

      [root@hub ]# cf-agent ./test_container.cf -b test -K -Dtwo
      R: package: php <<== this is also expected
      R: package: php-common
      R: package: php-cli

      [root@hub ]# cf-agent ./test_container.cf -b test -K -Dtwo,one
      R: zero: 0
      R: more: hello
      R: more: test
      *R: package: $(data[reinstall_list]) <<== where does this come from?
      R: zero: $(data[zero])
      R: more: $(data[more])*
      R: package: php
      R: package: php-common
      R: package: php-cli

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jiraadmin Old User (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel