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

abortclasses, abortbundleclasses fail on regular expression and/or literal matching

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.7.2
    • Component/s: Evaluation
    • Labels:
      None

      Description

      This bug could be related, but was supposedly fixed in 3.5.2 (https://cfengine.com/dev/issues/3114). I'm running cfengine 3.5.2 in Debian.

      For reference, here's the documentation:
      https://cfengine.com/docs/3.5/reference-components-cfagent.html#abortclasses

      abortclasses regular expressions do not seem to work, take this example, copied directly from the docs:

      <pre>
      body agent control {
      abortclasses =>

      { "danger.*", "should_not_continue" }

      ;
      }

      body common control {
      bundlesequence =>

      { "test_config" };
      }

      bundle common test_config {

      classes:
      "danger_will_robinson" expression => "any";

      reports:
      "Bundle Successfully Ran; it failed to abort";
      }

      </pre>
      output:

      > user@host:~/.cfagent/masterfiles (master)$ cf-agent -KI -f ./test-abortclasses-regex.cf
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 notice: R: Bundle Successfully Ran; it failed to abort
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      > 2013-10-29T12:49:54-0700 error: Unable to parse class expression 'danger.*'
      >


      abortbundleclasses don't seem to work at all, regular expression or not:

      <pre>
      body agent control {
      abortbundleclasses => { "abort" };
      }

      body common control {
      bundlesequence => { "test_config" }

      ;
      }

      bundle common test_config {

      classes:
      "abort" expression => "any";

      reports:
      "Bundle Successfully Ran; it failed to abort";
      }

      </pre>
      output:
      > user@host:~/.cfagent/masterfiles (master)$ cf-agent -KI -f ./test-abortbundleclasses-regex.cf
      > 2013-10-29T12:52:18-0700 notice: R: Bundle Successfully Ran; it failed to abort

        Attachments

          Activity

            People

            • Assignee:
              a10003 Eystein Maloy Stenberg
              Reporter:
              chrishiestand Chris Hiestand
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel