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

Methods promise logs incorrect compliance

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.0
    • Component/s: Logging
    • Labels:
      None

      Description

      Previous to commit "b92930eaf8559f5d80df8be227c58872f9ade35b":https://github.com/cfengine/core/commit/b92930eaf8559f5d80df8be227c58872f9ade35b the aggregate compliance was 100% for methods promises where all was kept. Since this commit, the aggregate compliance says 50%.

      Example:

      <pre>
      body common control
      {
      bundlesequence =>

      { "test" }

      ;
      }

      bundle agent test
      {
      methods:
      "hello" usebundle => hello;
      }

      bundle agent hello
      {
      files:
      "/tmp/hello"
      create => "true";
      }
      </pre>

      Output:

      <pre>
      2014-03-09T16:24:46-0400 verbose: /default/test/methods: Evaluating promise 'hello'
      2014-03-09T16:24:46-0400 verbose: /default/hello/files: Evaluating promise '/tmp/hello'
      2014-03-09T16:24:46-0400 verbose: Setting session ID, becoming process group leader
      2014-03-09T16:24:46-0400 verbose: Using bundlesequence =>

      {'test'}

      2014-03-09T16:24:46-0400 verbose: /default/test: Evaluating bundle pass 1
      2014-03-09T16:24:46-0400 verbose: /default/test/methods: Evaluating promise 'hello'
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello: Evaluating bundle pass 1
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello/files: Evaluating promise '/tmp/hello'
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello/files/'/tmp/hello'[0]: Using literal pathtype for '/tmp/hello'
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello/files/'/tmp/hello'[0]: Additional promise info: source path '/var/cfengine/inputs/promises.cf' at line 15
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello/files/'/tmp/hello'[0]: File '/tmp/hello' exists as promised
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello/files/'/tmp/hello'[0]: Handling file existence constraints on '/tmp/hello'
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello/files/'/tmp/hello'[0]: Handling file existence constraints on '/tmp/hello'
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello: Evaluating bundle pass 2
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello/files: Evaluating promise '/tmp/hello'
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello/files/'/tmp/hello'[0]: Using literal pathtype for '/tmp/hello'
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello: Evaluating bundle pass 3
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello/files: Evaluating promise '/tmp/hello'
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello/files/'/tmp/hello'[0]: Using literal pathtype for '/tmp/hello'
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello: Bundle Accounting Summary for 'hello'
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello: Promises kept in 'hello' = 1
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello: Promises not kept in 'hello' = 0
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello: Promises repaired in 'hello' = 0
      2014-03-09T16:24:46-0400 verbose: /default/test/methods/'hello'/default/hello: Aggregate compliance (promises kept/repaired) for bundle 'hello' = 100.0%
      2014-03-09T16:24:46-0400 verbose: /default/test: Evaluating bundle pass 2
      2014-03-09T16:24:46-0400 verbose: /default/test/methods: Evaluating promise 'hello'
      2014-03-09T16:24:46-0400 verbose: /default/test: Evaluating bundle pass 3
      2014-03-09T16:24:46-0400 verbose: /default/test/methods: Evaluating promise 'hello'
      2014-03-09T16:24:46-0400 error: /default/test/methods/'hello'[0]: Method 'hello' failed in some repairs or aborted
      2014-03-09T16:24:46-0400 verbose: /default/test: Bundle Accounting Summary for 'test'
      2014-03-09T16:24:46-0400 verbose: /default/test: Promises kept in 'test' = 1
      2014-03-09T16:24:46-0400 verbose: /default/test: Promises not kept in 'test' = 1
      2014-03-09T16:24:46-0400 verbose: /default/test: Promises repaired in 'test' = 0
      2014-03-09T16:24:46-0400 verbose: /default/test: Aggregate compliance (promises kept/repaired) for bundle 'test' = 50.0%
      2014-03-09T16:24:46-0400 verbose: No lock purging scheduled
      2014-03-09T16:24:46-0400 verbose: Logging total compliance, total 'Outcome of version (not specified) (agent-0): Promises observed to be kept 50%, Promises repaired 0%, Promises not repaired 50%'
      </pre>

        Attachments

          Activity

            People

            • Assignee:
              a10025 Volker Hilsheimer (Inactive)
              Reporter:
              Ed Ed I (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel