From: Ronnie Sahlberg Date: Fri, 7 Sep 2007 02:14:53 +0000 (+1000) Subject: add a short delay after stopping nfslock to make it less likely that X-Git-Tag: tevent-0.9.20~348^2~2430^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eb7a15730e3529a9b22be4dcd5a9854d139d2309;p=thirdparty%2Fsamba.git add a short delay after stopping nfslock to make it less likely that "weird" things happen (This used to be ctdb commit 4934c083cbcc19714094e08a0b7da1fb6fdc8a5a) --- diff --git a/ctdb/config/statd-callout b/ctdb/config/statd-callout index 0be496ef7d0..7a554dca3a0 100755 --- a/ctdb/config/statd-callout +++ b/ctdb/config/statd-callout @@ -43,12 +43,6 @@ case "$1" in # a clusterwide grace period (so other clients dont take out # conflicting locks through other nodes before all locks have been # reclaimed) - # we must also let some time pass between stopping and restarting the - # lockmanager since othervise there is a window where the lockmanager - # will respond "strangely" immediately after restarting it, which - # causes clients to fail to reclaim the locks. - # - service nfslock stop > /dev/null 2>&1 # we need these settings to make sure that no tcp connections survive # across a very fast failover/failback @@ -62,6 +56,7 @@ case "$1" in rm -f /var/lib/nfs/statd/sm.bak/* cat $STATD_SHARED_DIRECTORY/state >/var/lib/nfs/statd/state + # we must keep a monotonically increasing state variable for the entire # cluster so state always increases when ip addresses fail from one # node to another @@ -83,6 +78,14 @@ case "$1" in # service nfs stop > /dev/null 2>&1 # service nfs start > /dev/null 2>&1 + # we must also let some time pass between stopping and restarting the + # lockmanager since othervise there is a window where the lockmanager + # will respond "strangely" immediately after restarting it, which + # causes clients to fail to reclaim the locks. + # + service nfslock stop > /dev/null 2>&1 + sleep 2 + # copy all monitored clients on this node to the local lockmanager for f in `/bin/ls /etc/ctdb/state/statd/ip/* 2>/dev/null`; do ip=`/bin/basename $f`