From: Ronnie Sahlberg Date: Sat, 4 Aug 2007 01:23:04 +0000 (+1000) Subject: do not restart lockd/statd when we takeover an ip address this is X-Git-Tag: tevent-0.9.20~348^2~2444^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b58fe24893cf50f10a8354882398638414740e2;p=thirdparty%2Fsamba.git do not restart lockd/statd when we takeover an ip address this is 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) --- diff --git a/ctdb/config/statd-callout b/ctdb/config/statd-callout index 3f645ec732e..0c61c4a27ec 100755 --- a/ctdb/config/statd-callout +++ b/ctdb/config/statd-callout @@ -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 ;;