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

Missing bodies are not caught by cf-promises and rather generate "Type mismatch on rhs" error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 3.6.5
    • Fix Version/s: 3.7.0
    • Component/s: cf-promises
    • Labels:
      None

      Description

      If a body is missing, I would expect that this was detected and pointed out.
      This could happen if the standard library is not included or if the body name is mistyped.

      However, the following policy:

      bundle agent test
      {
        commands:
          "/bin/echo 123"
          action => if_repaired("echo_repaired");
      }
      

      generates the following error when run standalone on 3.6.5:

      <pre>

      1. cf-agent -K nonexistant_body_warning.cf -btest
        2015-04-30T21:40:22+0000 error: /default/test/commands/'/bin/echo 123'[0]: Type mismatch on rhs - expected type f for boolean constraint 'action'
        2015-04-30T21:40:22+0000 error: /default/test/commands/'/bin/echo 123'[0]: Promise belongs to bundle 'test' in file 'example.cf' near line 4
        2015-04-30T21:40:22+0000 error: /default/test/commands/'/bin/echo 123'[0]: Fatal CFEngine error: Aborted
        </pre>

        Attachments

          Activity

            People

            Assignee:
            a10042 Nick Anderson
            Reporter:
            a10003 Eystein Maloy Stenberg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: