Bug #11720
closedpolicy generation failure via rudder-reload-cf-served if PATH is restricted.
Description
I just switched our master to enforcing mode (because otherwise cf-served seems to not run)
Policy generation fails since it seems to call cf-served but doesn't use a path on "service".
"service" here resides at /sbin which isn't in the search path.
What is one supposed to do then?
@(
⇨ Policy update error for process '1381' at 2017-11-13 15:42:19
⇨ Exit code=-2147483648 for hook: '/opt/rudder/etc/hooks.d/policy-generation-finished/50-reload-policy-file-server'.
stdout:
stderr: 'cf-serverd: no process found
/opt/rudder/bin/rudder-reload-cf-serverd: line 13: service: command not found
'@
(For now I have added "/sbin/" to the script but this is not ideal, and seems to be fixed in the package - I'm sure there's some code in the NCF service methods for this you can just re-use)