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

depends_on package promise always runs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.x, 3.7.0
    • Component/s: Evaluation
    • Labels:
      None
    • Platform:
      Solaris, Linux, Any
    • Steps to reproduce:
      Acceptance/unit test attached

      Description

      Promises that depend_on packages will always run even if packages are not installed.

      <pre>
      body file control {
      inputs =>

      { "/var/cfengine/inputs/lib/3.6/common.cf", "/var/cfengine/inputs/lib/3.6/packages.cf", }

      ;
      }
      bundle agent dep
      {

      packages:
      "no_package"
      handle => "package_installed",
      package_method => apt_get_permissive,
      classes => classes_generic("package");

      reports:
      "Depends on – verified"
      depends_on =>

      { "package_installed" }

      ;
      package_not_ok::
      "package_not_ok";
      package_ok::
      "package_ok";
      }
      </pre>

      The "Depends on – verified" report should clearly NOT RUN.

      <pre>
      link:~/cf_tests] sudo cf-agent -K -f ./dep.cf -b dep
      2014-08-01T19:37:52-0700 error: /default/dep/packages/'no_package'[0]: Finished command related to promiser 'no_package' – an error occurred, returned 100
      2014-08-01T19:37:52-0700 error: /default/dep/packages/'no_package'[0]: Bulk package schedule execution failed somewhere - unknown outcome for 'no_package'
      R: Depends on – verified
      R: package_not_ok
      </pre>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10053 Marcin Pasinski
                Reporter:
                bahamat Brian Bennett
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel

                    Time Tracking

                    Estimated:
                    Original Estimate - 1 day, 5 hours
                    1d 5h
                    Remaining:
                    Not Specified
                    Logged:
                    Time Not Required
                    Not Specified