]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
add a short delay after stopping nfslock to make it less likely that
authorRonnie Sahlberg <sahlberg@ronnie>
Fri, 7 Sep 2007 02:14:53 +0000 (12:14 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Fri, 7 Sep 2007 02:14:53 +0000 (12:14 +1000)
"weird" things happen

(This used to be ctdb commit 4934c083cbcc19714094e08a0b7da1fb6fdc8a5a)

ctdb/config/statd-callout

index 0be496ef7d040c084269a58c7d375b4aec3e0d61..7a554dca3a0dacfdf71f98a4d7053f5ddf2fffbb 100755 (executable)
@@ -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`