add an option to skip checking that all the samba shares are ok
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 9 Jul 2008 22:56:33 +0000 (08:56 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 9 Jul 2008 22:56:33 +0000 (08:56 +1000)
when monitoring the node health.
this might be useful to skip for environments with thousands of shares

config/ctdb.sysconfig
config/events.d/50.samba

index 25b3f28cab2e8b70f0172aeb960fe1b721c9f835..9084f8eb8d322a901ef5fed48397b94cd4a3c310 100644 (file)
 # 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
index 8363a1a120968d84743865b64dca024eae6ec1f8..04ca6e78fe46c9d6a448cd2844a83ac46bcd8958 100755 (executable)
@@ -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