ctdb-eventscripts: Perform share check before NFS RPC checks in 60.ganesha
authorAmitay Isaacs <amitay@gmail.com>
Tue, 26 Nov 2013 00:39:54 +0000 (11:39 +1100)
committerMichael Adam <obnox@samba.org>
Wed, 27 Nov 2013 17:46:17 +0000 (18:46 +0100)
If NFS RPC checks do restart Ganesha, then it's possible that share
check can fail prematurely.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/config/events.d/60.ganesha

index 242321aa35f08440066c9cba66746ff80563a7ac..6e7d47df339a34764631a94b047bad2f7998c52e 100755 (executable)
@@ -187,6 +187,12 @@ case "$1" in
        ;;
 
      monitor)
+       # Check that directories for shares actually exist.
+       [ "$CTDB_NFS_SKIP_SHARE_CHECK" = "yes" ] || {
+           grep Path /etc/ganesha/$CTDB_CLUSTER_FILESYSTEM_TYPE.ganesha.exports.conf |
+           cut -f2 -d\" | sort -u | ctdb_check_directories
+       } || exit $?
+
        update_tickles 2049
 
        # check that statd responds to rpc requests
@@ -209,12 +215,6 @@ case "$1" in
        # not a critical service so we dont flag the node as unhealthy
        nfs_check_rpc_service "rquotad" \
            -gt 0 "verbose restart:b"
-
-       # Check that directories for shares actually exist.
-       [ "$CTDB_NFS_SKIP_SHARE_CHECK" = "yes" ] || {
-           grep Path /etc/ganesha/$CTDB_CLUSTER_FILESYSTEM_TYPE.ganesha.exports.conf |
-           cut -f2 -d\" | ctdb_check_directories
-       } || exit $?
        ;;
 
      *)