]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
do not restart lockd/statd when we takeover an ip address this is
authorRonnie Sahlberg <sahlberg@ronnie>
Sat, 4 Aug 2007 01:23:04 +0000 (11:23 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Sat, 4 Aug 2007 01:23:04 +0000 (11:23 +1000)
overkill since
1, we now kill the tcpconnections for lockd in 60.nfs
2, rpc.statd on linux sends out the notifications using the wrong
interface anyway  which breaks a lot of clients  including linux !

use our own smnotify tool instead of sm-notify

(This used to be ctdb commit 0163ad0ec01be6189a98ea91e5cec40f6750218f)

ctdb/config/statd-callout

index 3f645ec732ef1f2b348af0614a44223ffc864c3a..0c61c4a27ec4a0377eeb4b08779c7f4768af89b5 100755 (executable)
@@ -27,19 +27,22 @@ case "$1" in
        done
        ;;
   notify)
-       # restart the local lock manager and statd
-       /etc/init.d/nfslock stop > /dev/null 2>&1 
-       /etc/init.d/nfslock start > /dev/null 2>&1 
        # send out notifications to any additional ips we now serve
         for f in `/bin/ls /etc/ctdb/state/statd/ip/*`; do
            ip=`/bin/basename $f`
-           [ -d $STATD_SHARED_DIRECTORY/$ip ] && {
-               # we must copy to a different directory since rpc.statd gets
-               # "upset" if sm-notify touches the files.
+           [ -d $STATD_SHARED_DIRECTORY/$ip ] && [ -x /usr/bin/smnotify ] && {
                /bin/rm -rf /tmp/statd/$ip
                /bin/mkdir -p /tmp/statd/$ip
-               /bin/cp -apr $STATD_SHARED_DIRECTORY/$ip/* /tmp/statd/$ip
-               [ -x /usr/sbin/sm-notify ] && /usr/sbin/sm-notify -P /tmp/statd/$ip -v $ip -n
+               /bin/cp $STATD_SHARED_DIRECTORY/$ip/sm/* /tmp/statd/$ip
+               for g in `/bin/ls /tmp/statd/$ip/*`; do
+                       client=`/bin/basename $g`
+                       # send the notifications twice so we force the other
+                       # end to recognice a state change has occured and that
+                       # it MUST reclaim the locks.
+                       #
+                       /usr/bin/smnotify --client=$client --ip=$ip --server=$ip --stateval=4
+                       /usr/bin/smnotify --client=$client --ip=$ip --server=$ip --stateval=5
+               done
            }
        done
        ;;