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

No error should be emitted when a promised file does not exist AND create => "false" is specified

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cf-agent
    • Labels:
      None
    • Complexity:
      S

      Description

      The agent should not emit an error when a promised file does not exist if create => "false" is also specified.

      For example, here I promise to monitor /tmp/detect_changes/my_file for change. I don't want to create or delete the file, I just want to monitor it for changes, so that I could know if the file gets created and then removed.

      bundle agent example_observe_file_changes_recursively
      {
      
        files:
            "/tmp/detect_changes/my_file"
              create => "false",
              changes => diff;
      }
      bundle agent __main__
      {
        methods: "example_observe_file_changes_recursively";
      }
      
      error: Promised to monitor '/tmp/detect_changes/my_file' for changes, but file does not exist
      error: Method 'example_observe_file_changes_recursively' failed in some repairs

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              a10042 Nick Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel