XMLWordPrintable

    Details

    • Type: Bug
    • Status: Rejected
    • Priority: Low
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Logging
    • Labels:
      None

      Description

      CFEngine logs following lines:
      Oct 15 15:28:13 m1956 cf3[15705]: Unreadable promise proposals at 'lib/$(sys.cf_version_major).$(sys.cf_version_minor)/paths.cf'. (stat: No such file or directory)
      Oct 15 15:30:13 m1956 cf3[15705]: Unreadable promise proposals at 'lib/$(sys.cf_version_major).$(sys.cf_version_minor)/paths.cf'. (stat: No such file or directory)
      Oct 15 15:34:09 m1956 cf3[15705]: Unreadable promise proposals at 'lib/$(sys.cf_version_major).$(sys.cf_version_minor)/paths.cf'. (stat: No such file or directory)

      The thing is the file exist on my system:
      [root@m1956 masterfiles]# ls -l /var/cfengine/inputs/lib/3.5/
      total 196
      rw-rr- 1 root root 3645 15.10. 08:32 bundles.cf
      rw-rr- 1 root root 4172 15.10. 08:32 commands.cf
      rw-rr- 1 root root 6266 15.10. 08:32 common.cf
      rw-rr- 1 root root 2527 15.10. 08:32 databases.cf
      rw-rr- 1 root root 9430 15.10. 08:32 edita.cf
      rw-rr- 1 root root 30687 15.10. 08:32 files.cf
      rw-rr- 1 root root 2901 15.10. 08:32 guest_environments.cf
      rw-rr- 1 root root 2540 15.10. 08:32 monitor.cf
      rw-rr- 1 root root 40064 15.10. 08:32 packages.cf
      rw------ 1 root root 12310 15.10. 15:41 paths.cf
      rw------ 1 root root 12349 15.10. 15:36 paths.cf.cfsaved
      rw-rr- 1 root root 2540 15.10. 08:32 processes.cf
      rw-rr- 1 root root 37097 15.10. 08:32 services.cf
      rw-rr- 1 root root 2615 15.10. 08:32 storage.cf
      [root@m1956 masterfiles]#

      I also tested that the paths.cf gets included and is working even though its logged as missing:
      body common control
      {
      inputs =>

      { "def.cf", "controls/cf_agent.cf", "controls/cf_execd.cf", "controls/cf_monitord.cf", "controls/cf_runagent.cf", "controls/cf_serverd.cf", "lib/$(sys.cf_version_major).$(sys.cf_version_minor)/paths.cf", "lib/$(sys.cf_version_major).$(sys.cf_version_minor)/common.cf", "lib/$(sys.cf_version_major).$(sys.cf_version_minor)/commands.cf", "lib/$(sys.cf_version_major).$(sys.cf_version_minor)/packages.cf", "lib/$(sys.cf_version_major).$(sys.cf_version_minor)/files.cf", "lib/$(sys.cf_version_major).$(sys.cf_version_minor)/services.cf", "lib/$(sys.cf_version_major).$(sys.cf_version_minor)/processes.cf", "lib/$(sys.cf_version_major).$(sys.cf_version_minor)/storage.cf", "lib/$(sys.cf_version_major).$(sys.cf_version_minor)/databases.cf", "lib/$(sys.cf_version_major).$(sys.cf_version_minor)/monitor.cf", "lib/$(sys.cf_version_major).$(sys.cf_version_minor)/guest_environments.cf", "lib/$(sys.cf_version_major).$(sys.cf_version_minor)/bundles.cf", "cf-sketch-runfile.cf", "hosts/$(sys.uqhost).cf" }

      ;

      bundlesequence =>

      { "def", "cfsketch_run", "$(sys.uqhost)", "test", }

      ;

      version => "Edita Promises.cf 3.5.2";
      }

      bundle agent test
      {
      reports:
      "PATH to cat = $(paths.path[cat])";
      }

      Running the above promises.cf gives following on my /var/log/messages:
      Oct 15 15:38:28 m1956 cf3[24653]: Syntax errors were found in the main policy file
      Oct 15 15:38:41 m1956 cf3[24658]: R: PATH to cat = /bin/cat
      Oct 15 15:39:05 m1956 cf3[15705]: Unreadable promise proposals at 'lib/$(sys.cf_version_major).$(sys.cf_version_minor)/paths.cf'. (stat: No such file or directory)
      Oct 15 15:41:20 m1956 cf3[24721]: R: PATH to cat = /bin/cat
      Oct 15 15:44:01 m1956 cf3[15705]: Unreadable promise proposals at 'lib/$(sys.cf_version_major).$(sys.cf_version_minor)/paths.cf'. (stat: No such file or directory)

      So seems that during variable expansion it checks if the file exists before expanding the variables, logs the error and then continues as normal.
      This is quite irritating as all my cfengine clients give out this message, they just vary which file they complain about. Add centralized logging and you have plenty of false log messages filling disk space.

        Attachments

          Activity

            People

            • Assignee:
              a10042 Nick Anderson
              Reporter:
              zmyrgel Timo Myyrä (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel