The branch, master has been updated via 25c4ce7e919f13226219f036bcffd2be76b2f06c (commit) from c3eb53509331045074579468d94ed7e31101bba4 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 25c4ce7e919f13226219f036bcffd2be76b2f06c Author: Ronnie Sahlberg <ronniesahlb...@gmail.com> Date: Thu Aug 19 07:18:22 2010 +1000 On RHEL, "service nfs stop;service nfs start" and "service nfs restart" sometimes (very rarely) fails to restart the service. Add a function to restart NFSd on SLES and RHEL-like systems. If we detect the system is unhealthy due to kNFSd not running, try to restart the service again "service nfs restart" and hope for the best. CQ1019372 ----------------------------------------------------------------------- Summary of changes: config/events.d/60.nfs | 7 ++++++- config/functions | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs index d403792..637efe8 100755 --- a/config/events.d/60.nfs +++ b/config/events.d/60.nfs @@ -78,7 +78,12 @@ case "$1" in # check that NFS responds to rpc requests [ "$CTDB_NFS_SKIP_KNFSD_ALIVE_CHECK" = "yes" ] || { - ctdb_check_rpc "NFS" 100003 3 + (ctdb_check_rpc "NFS" 100003 3) + [ $? = "0" ] || { + echo "Trying to restart NFS service" + startstop_nfs restart + exit 1 + } } # and that its directories are available diff --git a/config/functions b/config/functions index 69c5ce1..35b7db2 100755 --- a/config/functions +++ b/config/functions @@ -366,6 +366,9 @@ startstop_nfs() { stop) service nfsserver stop > /dev/null 2>&1 ;; + restart) + service nfsserver restart + ;; esac ;; rhel) @@ -378,6 +381,10 @@ startstop_nfs() { service nfs stop > /dev/null 2>&1 service nfslock stop > /dev/null 2>&1 ;; + restart) + service nfslock restart + service nfs restart + ;; esac ;; *) -- CTDB repository