check the shares if they are available before we decide to try to restart nfs
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 10 Aug 2011 21:13:28 +0000 (07:13 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 10 Aug 2011 21:13:28 +0000 (07:13 +1000)
CQ S1027529

config/events.d/60.nfs

index 0cea531fa1554a1b06fa1735427623726022029c..ea05b1b9ee1e828be68f21d92ac0a14776a8564f 100755 (executable)
@@ -47,6 +47,13 @@ case "$1" in
        ;;
 
       monitor)
+       # and that its directories are available
+       [ "$CTDB_NFS_SKIP_SHARE_CHECK" = "yes" ] || {
+           exportfs | grep -v '^#' | grep '^/' |
+           sed -e 's/[[:space:]]\+[^[:space:]]*$//' |
+           ctdb_check_directories
+       } || exit $?
+
        if ctdb_service_needs_reconfigure ; then
            ctdb_service_reconfigure
            exit 0
@@ -105,13 +112,6 @@ case "$1" in
            fi
        }
 
-       # and that its directories are available
-       [ "$CTDB_NFS_SKIP_SHARE_CHECK" = "yes" ] || {
-           exportfs | grep -v '^#' | grep '^/' |
-           sed -e 's/[[:space:]]\+[^[:space:]]*$//' |
-           ctdb_check_directories
-       } || exit $?
-
        # check that lockd responds to rpc requests
        if ctdb_check_rpc "LOCKD" 100021 1 >/dev/null ; then
                (service_name="lockd"; ctdb_counter_init)