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

The cron.d watchdog implementation should be more strict about interpreting result of pgrep and only run when pgrep is actually present on the system

    XMLWordPrintable

    Details

      Description

      Ticket created in response to Pull Request: https://github.com/cfengine/masterfiles/pull/1636 opened by Mike Weilgart.

      Currently, the watchdog is enabled if pgrep path to be defined for the OS we're running on; we need the pgrep command to actually be present on the particular host.

      Currently, any failure status of the pgrep command indicated that cf-execd should be started. This included exit status 3 (fatal error, out of memory, etc.) as well as exit status 127 (command not found) and exit status 126 (execute bit missing from pgrep binary).

      In any of these failure cases, with the old watchdog, the result would be endless cf-execd processes being started - one every minute!! (Easy to test with chmod -x /usr/bin/pgrep or appropriate path for the OS.)

      It should only take exit status 1 to mean that no process matched (but pgrep was successfully run). This matches the pgrep documentation.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel