[SCM] CTDB repository - branch 1.2 updated - ctdb-1.9.1-279-gdff5b83

Ronnie Sahlberg sahlberg at samba.org
Wed Jan 5 22:18:12 MST 2011


The branch, 1.2 has been updated
       via  dff5b8356de639b757d02af6ca48f25e1497fe7a (commit)
      from  f098854500f36b03ebf6c3b4a6da0dd867ce9cf1 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2


- Log -----------------------------------------------------------------
commit dff5b8356de639b757d02af6ca48f25e1497fe7a
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jan 6 15:42:45 2011 +1100

    60.nfs Check if we have rpc.statd and if not, skip checking for statd
    availability at all (since we cant restart it, there is not point checking
    if it is alive)

-----------------------------------------------------------------------

Summary of changes:
 config/events.d/60.nfs |   41 +++++++++++++++++++++++------------------
 1 files changed, 23 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs
index 87955df..301ead8 100755
--- a/config/events.d/60.nfs
+++ b/config/events.d/60.nfs
@@ -55,24 +55,29 @@ case "$1" in
 
 	# check that statd responds to rpc requests
 	# if statd is not running we try to restart it
-	if ctdb_check_rpc "STATD" 100024 1 >/dev/null ; then
-		(service_name="nfs_statd"; ctdb_counter_init)
-	else
-		p="rpc.statd" ; cmd="$p"
-		cmd="${cmd}${STATD_HOSTNAME:+ -n }${STATD_HOSTNAME}"
-		cmd="${cmd}${STATD_PORT:+ -p }${STATD_PORT}"
-		cmd="${cmd}${STATD_OUTGOING_PORT:+ -o }${STATD_OUTGOING_PORT}"
-		(
-			service_name="nfs_statd"
-			ctdb_counter_incr
-			ctdb_check_counter_limit 10 quiet >/dev/null
-		) || {
-			echo "$ctdb_check_rpc_out"
-			echo "Trying to restart STATD [$cmd]"
-		}
-		$cmd
-	fi
-
+	# we only do this IF we have a rpc.statd command.
+	# For platforms where rpc.statd does not exist, we skip
+	# the check compeltely
+	p="rpc.statd"
+	which $p >/dev/null 2>/dev/null && {
+		if ctdb_check_rpc "STATD" 1000247 1 >/dev/null ; then
+			(service_name="nfs_statd"; ctdb_counter_init)
+		else
+			cmd="$p"
+			cmd="${cmd}${STATD_HOSTNAME:+ -n }${STATD_HOSTNAME}"
+			cmd="${cmd}${STATD_PORT:+ -p }${STATD_PORT}"
+			cmd="${cmd}${STATD_OUTGOING_PORT:+ -o }${STATD_OUTGOING_PORT}"
+			(
+				service_name="nfs_statd"
+				ctdb_counter_incr
+				ctdb_check_counter_limit 10 quiet >/dev/null
+			) || {
+				echo "$ctdb_check_rpc_out"
+				echo "Trying to restart STATD [$cmd]"
+				$cmd
+			}
+		fi
+	}
 
 	# check that NFS responds to rpc requests
 	[ "$CTDB_NFS_SKIP_KNFSD_ALIVE_CHECK" = "yes" ] || {


-- 
CTDB repository


More information about the samba-cvs mailing list