60.nfs only fails or warns after 10 consecutive nfsd/statd failures.
authorMartin Schwenke <martin@meltin.net>
Tue, 16 Nov 2010 08:31:18 +0000 (19:31 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 17 Nov 2010 00:43:09 +0000 (11:43 +1100)
commit79c25fe241cf5d8f92e23d3736823ebaf4e1769d
tree6c0de1a6c9153e4ba29113cd1fe777e707a5951e
parentad18bfa398e582474afe25340368e39d4e74e3c6
60.nfs only fails or warns after 10 consecutive nfsd/statd failures.

These failures are sometimes the result of slow restarts so we want to
avoid dirtying the logs or marking a node unhealthy because of them,
unless they are excessive.

For these 2 cases we use the existing fail counting code but hack a
temporary service_name in a subshell to allow separate fail counts.

We also update ctdb_check_rpc() so that it captures the error output
from rpcinfo and we add a message including the service name to the
beginning.  The error is printed to stdout but is also stored in
ctdb_check_rpc_out to allow it to be conditionally used by the caller.
This function also now returns non-zero rather than exiting on
failure.

Other direct rpcinfo calls are relaced by called to ctdb_check_rpc()
for consistency.

Option handling code for service restarts is cleaned up so that fits
in 80 columns.  A more informative restart messageis now used in all
cases, printing the exact command being used to start a service.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/events.d/60.nfs
config/functions