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

variables destroyed when bundle is called a second time

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.x
    • Component/s: Evaluation
    • Labels:
      None
    • Platform:
      Any

      Description

      This fails in 3.5.2 I hope this can make it to 3.5.4. It does seem to work with 3.6.0b2. I'll try to make an acceptance test tomorrow.

      <pre>
      body common control
      {
      bundlesequence =>

      { "main", }

      ;
      }

      bundle agent main
      {
      methods:
      one::
      "one" usebundle => gvar( "x", "one" );
      two::
      "two" usebundle => gvar( "y", "two" );

      reports:
      one::
      "x => ${gvar.x}";
      two::
      "y => ${gvar.y}";
      }

      bundle agent gvar ( name, value )
      {
      vars:
      "${name}" string => "${value}";
      }
      [neil@frodo inputs]$ cf-agent -Kf ./bug.cf -D two
      2014-03-31T17:23:25-0400 notice: R: y => two
      [neil@frodo inputs]$ cf-agent -Kf ./bug.cf -D one
      2014-03-31T17:23:28-0400 notice: R: x => one
      [neil@frodo inputs]$ cf-agent -Kf ./bug.cf -D two,one
      2014-03-31T17:23:30-0400 notice: R: x => ${gvar.x}
      2014-03-31T17:23:30-0400 notice: R: y => two
      </pre>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              neilhwatson Neil Watson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel