[SCM] CTDB repository - branch master updated - dd900d4ed8f07003c4f1db2d441cfc2ef2c89ef5

Ronnie Sahlberg sahlberg at samba.org
Wed Jul 9 23:02:02 GMT 2008


The branch, master has been updated
       via  dd900d4ed8f07003c4f1db2d441cfc2ef2c89ef5 (commit)
       via  90ab48bb8e17f59fcb27ddbff51de546c4447b64 (commit)
       via  3c3d3ac5f7dec258589aaaf0633cab3b3af65cf3 (commit)
      from  77458b2b6b51b2970c12b0e5b097088d3fb9d358 (commit)

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


- Log -----------------------------------------------------------------
commit dd900d4ed8f07003c4f1db2d441cfc2ef2c89ef5
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 10 08:56:33 2008 +1000

    add an option to skip checking that all the samba shares are ok
    when monitoring the node health.
    this might be useful to skip for environments with thousands of shares

commit 90ab48bb8e17f59fcb27ddbff51de546c4447b64
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 10 08:05:34 2008 +1000

    remove the attempts to restart NFS.
    
    nfs should never stop spontaneously so trying to restart it is
    just counterproductive and at best a workaround to
    hide real bugs.

commit 3c3d3ac5f7dec258589aaaf0633cab3b3af65cf3
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Jul 9 15:17:27 2008 +1000

    if we have enabled LVS   but we dont have all the required packages
    just log it to the messages
    dont stop ctdb from starting

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

Summary of changes:
 config/ctdb.sysconfig    |    5 +++++
 config/events.d/50.samba |    7 +++++--
 config/events.d/60.nfs   |   26 +-------------------------
 config/events.d/91.lvs   |    2 +-
 4 files changed, 12 insertions(+), 28 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/ctdb.sysconfig b/config/ctdb.sysconfig
index 25b3f28..9084f8e 100644
--- a/config/ctdb.sysconfig
+++ b/config/ctdb.sysconfig
@@ -42,6 +42,11 @@
 # default is to not manage Samba
 # CTDB_MANAGES_SAMBA=yes
 
+# should we skip the check of whether the shares that samba is exporting
+# is available or not. This may be useful if there are a huge number of shares
+# since checking each one of them might take a long time.
+# CTDB_SAMBA_SKIP_SHARE_CHECK="yes"
+
 # should ctdb manage starting/stopping Winbind service?
 # if left comented out then it will be autodetected based on smb.conf
 # CTDB_MANAGES_WINBIND=yes
diff --git a/config/events.d/50.samba b/config/events.d/50.samba
index 8363a1a..04ca6e7 100755
--- a/config/events.d/50.samba
+++ b/config/events.d/50.samba
@@ -113,8 +113,11 @@ case $cmd in
 	    exit 1
 	}
 
-	smb_dirs=`testparm -s 2> /dev/null | egrep '^[[:space:]]*path = '  | cut -d= -f2`
-	ctdb_check_directories "Samba" $smb_dirs	
+	[ "$CTDB_SAMBA_SKIP_SHARE_CHECK" != "yes" ] && {
+echo do da test
+		smb_dirs=`testparm -s 2> /dev/null | egrep '^[[:space:]]*path = '  | cut -d= -f2`
+		ctdb_check_directories "Samba" $smb_dirs	
+	}
 
 	smb_ports=`testparm -s --parameter-name="smb ports" 2> /dev/null`
 	ctdb_check_tcp_ports "Samba" $smb_ports
diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs
index de7e012..b3b0e69 100755
--- a/config/events.d/60.nfs
+++ b/config/events.d/60.nfs
@@ -68,27 +68,6 @@ case $cmd in
 	;;
 
       monitor)
-	# check how many times in a row that nfsd has stopped responding
-	# after 3 times in a row we try to restart the full nfs service
-	NFSD_FAIL_COUNT_FILE=$CTDB_BASE/state/nfs/nfsd_fail_count
-	[ ! -f $NFSD_FAIL_COUNT_FILE ] && {
-		echo 0 > $NFSD_FAIL_COUNT_FILE
-	}
-	NFSD_FAIL_COUNT=`cat $NFSD_FAIL_COUNT_FILE`
-	[ -z "$NFSD_FAIL_COUNT" ] && {
-		echo 0 > $NFSD_FAIL_COUNT_FILE
-		NFSD_FAIL_COUNT=`cat $NFSD_FAIL_COUNT_FILE`
-	}
-	# ok it has failed a few times too many. try restarting it.
-	[ `expr "$NFSD_FAIL_COUNT" ">" "3"` != "0" ] && {
-		echo 60.nfs NFSD: trying to restart NFSD...
-		echo 0 > $NFSD_FAIL_COUNT_FILE
-		service nfs restart
-		exit 0
-	}
-	expr "$NFSD_FAIL_COUNT" "+" "1" > $NFSD_FAIL_COUNT_FILE
-
-
 	# check that statd responds to rpc requests
 	# if statd is not running we try to restart it once and wait
 	# for the next monitoring event to verify if it is running or not
@@ -136,10 +115,7 @@ case $cmd in
 		rpc.mountd $RPCMOUNTDOPTS &
 		exit 1
 	}
-	
-	# everything was ok with nfs so reset the fail count back to 0
-	echo 0 > $NFSD_FAIL_COUNT_FILE
-	;;
+       	;;
 
 esac
 
diff --git a/config/events.d/91.lvs b/config/events.d/91.lvs
index e93f237..678215b 100755
--- a/config/events.d/91.lvs
+++ b/config/events.d/91.lvs
@@ -9,7 +9,7 @@ loadconfig ctdb
 
 [ -x /sbin/ipvsadm ] || {
     echo "LVS configured but /sbin/ipvsadm is not installed."
-    exit 1
+    exit 0
 }
 
 


-- 
CTDB repository


More information about the samba-cvs mailing list