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

Methods and services type promises do not respect action_policy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.1
    • Component/s: Promise type: methods
    • Labels:
      None

      Description

      <pre>
      methods:
      "test remove telnet action warn"
      usebundle => package_absent("telnet-server"),
      action => warn_only;
      </pre>

      <pre>
      [root@hub masterfiles]# rpm -q telnet-server
      telnet-server-0.17-47.el6_3.1.x86_64
      [root@hub masterfiles]# cf-agent -KIf ./promises.cf -b example
      2014-05-27T18:58:51+0000 info: Using command line specified bundlesequence
      2014-05-27T18:58:52+0000 info: /default/example/methods/'test remove telnet action warn'/default/package_absent/packages: Deleting telnet-server...
      [root@hub masterfiles]# rpm -q telnet-server
      package telnet-server is not installed
      </pre>

      Services are also affected by this.
      <pre>
      services:
      "telnet"
      service_policy => "disable",
      action => warn_only;
      </pre>

      [root@hub masterfiles]# cf-agent -KIf ./promises.cf -b example
      <pre>
      2014-05-27T19:25:36+0000 info: Using command line specified bundlesequence
      2014-05-27T19:25:36+0000 info: /default/example/services/'telnet'/default/standard_services/commands/'/sbin/chkconfig telnet off'[0]: Executing 'no timeout' ... '/sbin/chkconfig telnet off'
      2014-05-27T19:25:36+0000 info: /default/example/services/'telnet'/default/standard_services/commands/'/sbin/chkconfig telnet off'[0]: Command related to promiser '/sbin/chkconfig telnet off' returned code defined as promise kept 0
      2014-05-27T19:25:36+0000 info: /default/example/services/'telnet'/default/standard_services/commands/'/sbin/chkconfig telnet off'[0]: Completed execution of '/sbin/chkconfig telnet off'
      R: standard_services: skipping chkconfig layer to stop telnet because telnet is not registered with chkconfig (chkconfig mode off)

      </pre>

        Attachments

          Release management

            Activity

              People

              Assignee:
              a10025 Volker Hilsheimer (Inactive)
              Reporter:
              a10042 Nick Anderson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: