eventscripts: Do not restart NFS on reconfigure, just do statd notify
authorMartin Schwenke <martin@meltin.net>
Mon, 9 Dec 2013 00:47:01 +0000 (11:47 +1100)
committerMartin Schwenke <martin@meltin.net>
Mon, 9 Dec 2013 00:47:01 +0000 (11:47 +1100)
See also commit 2629de72e1f37b5e46772c2ef8d8d0012fc4ed37 in the master
branch.

In this branch the NFS restart was accidentally re-added in
30e05c8b14413f3e1150b01e856d4b51c675ea5c and formalised in
3fd4da153703bc83cf102ad367dd20d873e938a0 when the mistake wasn't
realised.

Signed-off-by: Martin Schwenke <martin@meltin.net>
config/events.d/60.nfs

index f567c82a400ad6495e3b285ee388b7909644210f..13a2b04d128948e580d54916acf8445468f37788 100755 (executable)
@@ -14,7 +14,16 @@ start_nfs() {
 service_name="nfs"
 service_start="start_nfs"
 service_stop="startstop_nfs stop"
-service_reconfigure="startstop_nfs restart"
+service_reconfigure="reconfigure_nfs"
+
+reconfigure_nfs ()
+{
+    # If IPs have been reallocated, we must restart the lock manager
+    # across all nodes and notify statd clients.
+    if [ -x "$CTDB_BASE/statd-callout" ] ; then
+       "$CTDB_BASE/statd-callout" notify &
+    fi >/dev/null 2>&1
+}
 
 nfs_check_thread_count ()
 {
@@ -200,12 +209,6 @@ case "$1" in
            ctdb_service_reconfigure
            exit 0
        fi
-
-       # if the ips have been reallocated, we must restart the lockmanager
-       # across all nodes and ping all statd listeners
-       [ -x $CTDB_BASE/statd-callout ] && {
-               $CTDB_BASE/statd-callout notify &
-       } >/dev/null 2>&1
        ;;
     *)
        ctdb_standard_event_handler "$@"