You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the request/suggestion of Matt McLean <[email protected]>, I added 2
new flags to check_ps_service() that allow the user to request that
the actions to be taken, whether that's start/restart/cycle/-e or
stop/kill/-E, be verified by NHC, and that the check should only fail
if the action isn't successful.
The -v or "Verify Sync" flag causes NHC to wait on the requested
action to complete, whatever that action may be, and check the exit
code of the action. If it returns success, the check will pass. The
check will only fail if the action fails. For example, the following
will cause NHC to restart the named service if it's not running, and
the check will only fail if "/sbin/service named restart" returns
non-zero: check_ps_service -v -r named
The -V or "Verify Check" option will do the same steps outlined above
for -v but will additionally check to make sure that the expected
result of the action actually occurred; i.e., that the service is
subsequently running or not running, depending on the parameters of
the check. For example, the following will kill any non-root sshd
found running on the system, *and* make sure the kill command
succeeded, *and* make sure afterward that the process has actually
gone away (and fail the check if, and only if, the process still
exists): check_ps_service -V -k -u !root sshd
These changes are currently on branch service-restart-sync but will be
merged into master after additional testing. Those wishing to test in
the interim can build from this branch.
0 commit comments