[SCM] CTDB repository - branch master updated - ctdb-1.0.72-10-g051ae5f

Ronnie Sahlberg sahlberg at samba.org
Fri Feb 20 00:00:48 GMT 2009


The branch, master has been updated
       via  051ae5f3c13892b860818eac803d348f09845dc6 (commit)
      from  7412c6706c2d8ec668d0a6a50471db369f3dbf2b (commit)

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


- Log -----------------------------------------------------------------
commit 051ae5f3c13892b860818eac803d348f09845dc6
Author: root <root at test2n1.VSOFS1.COM>
Date:   Fri Feb 20 10:58:34 2009 +1100

    make it possible to disable checking all samba shares.
    
    this is a timeconsuming process and might not be feasible to perform if there are very many thousand shares

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

Summary of changes:
 config/ctdb.sysconfig    |    5 +++++
 config/events.d/50.samba |   30 ++++++++++++++++--------------
 2 files changed, 21 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/ctdb.sysconfig b/config/ctdb.sysconfig
index d0d9f75..25c2958 100644
--- a/config/ctdb.sysconfig
+++ b/config/ctdb.sysconfig
@@ -42,6 +42,11 @@
 # default is to not manage Samba
 # CTDB_MANAGES_SAMBA=yes
 
+# If there are very many shares it may not be feasible to check that all
+# of them are available during each monitoring interval.
+# In that case this check can be disabled
+# CTDB_SAMBA_SKIP_SHARE_CHECK=yes
+
 # specify which ports we should check that there is a daemon listening to
 # by default we use testparm and look in smb.conf to figure out.
 # CTDB_SAMBA_CHECK_PORTS="445"
diff --git a/config/events.d/50.samba b/config/events.d/50.samba
index 58df1dc..3e7164a 100755
--- a/config/events.d/50.samba
+++ b/config/events.d/50.samba
@@ -214,21 +214,23 @@ case $cmd in
 		touch $CTDB_BASE/state/samba/periodic_cleanup
 	}
 
-	testparm_background_update
-
-	testparm_cat | egrep '^WARNING|^ERROR|^Unknown' && {
-	    testparm_foreground_update
-	    testparm_cat | egrep '^WARNING|^ERROR|^Unknown' && {
-		echo "ERROR: testparm shows smb.conf is not clean"
-		exit 1
-	    }
-	}
+	[ "$CTDB_SAMBA_SKIP_SHARE_CHECK" = "yes" ] || {
+		testparm_background_update
+
+		testparm_cat | egrep '^WARNING|^ERROR|^Unknown' && {
+		    testparm_foreground_update
+		    testparm_cat | egrep '^WARNING|^ERROR|^Unknown' && {
+			echo "ERROR: testparm shows smb.conf is not clean"
+			exit 1
+		    }
+		}
 
-	smb_dirs=`testparm_cat | egrep '^[[:space:]]*path = ' | cut -d= -f2`
-	ctdb_check_directories_probe "Samba" $smb_dirs || {
-	    testparm_foreground_update
-	    smb_dirs=`testparm_cat | egrep '^[[:space:]]*path = ' | cut -d= -f2`
-	    ctdb_check_directories "Samba" $smb_dirs
+		smb_dirs=`testparm_cat | egrep '^[[:space:]]*path = ' | cut -d= -f2`
+		ctdb_check_directories_probe "Samba" $smb_dirs || {
+		    testparm_foreground_update
+		    smb_dirs=`testparm_cat | egrep '^[[:space:]]*path = ' | cut -d= -f2`
+		    ctdb_check_directories "Samba" $smb_dirs
+		}
 	}
 
 	smb_ports="$CTDB_SAMBA_CHECK_PORTS"


-- 
CTDB repository


More information about the samba-cvs mailing list