Details
-
Type:
Bug
-
Status: Done
-
Priority:
(None)
-
Resolution: Fixed
-
Affects Version/s: 3.10.7, 3.12.3, 3.15.0
-
Component/s: Masterfiles Policy Framework (MPF/COPBL/STDLIB)
-
Labels:None
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.