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:15 +0000 (11:43 +1100)
commitb717cf7e4f40457df0063e08122eeafd9c339168
tree5f1fad781737e8acb839024f30cf781f21ad9b88
parente7a89ac55fc0f6ff91ee9e7ee1c4d42f6baa2b77
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