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:20 +0000 (11:43 +1100)
commit7b91e4fa1d00bcba860dfe502e83161a6d06de6b
tree37b16ad72c39f8174df8d8d5c1f6875627a934a2
parent9f0e1e5e0b100c3ccfaa2e459b3249386ec27b44
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