add CTDB_MANAGES_WINBIND to /etc/sysconfig/ctdb to allow ctdb to be used
authorRonnie Sahlberg <sahlberg@ronnie>
Wed, 14 Nov 2007 05:17:52 +0000 (16:17 +1100)
committerRonnie Sahlberg <sahlberg@ronnie>
Wed, 14 Nov 2007 05:17:52 +0000 (16:17 +1100)
in environments where samba is used without winbind

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

index d290321b99b0553b4bf25ee1af6d0adbb85d52e8..bbb6f270b17cb16b7f7815673077a39cfbeedd8b 100644 (file)
@@ -33,6 +33,9 @@
 # default is to not manage Samba
 # CTDB_MANAGES_SAMBA=yes
 
+# should ctdb manage starting/stopping Winbind service?
+# CTDB_MANAGES_WINBIND=yes
+
 # you may wish to raise the file descriptor limit for ctdb
 # use a ulimit command here. ctdb needs one file descriptor per
 # connected client (ie. one per connected client in Samba)
index 5f9fa4faface098599007daf7fa3c404e4bc8e42..88d8e4e43893a091afe392d16f8d22fbf4c32234 100755 (executable)
@@ -32,17 +32,21 @@ case $cmd in
 
        # make sure samba is not already started
        service smb stop > /dev/null 2>&1
-       service winbind stop > /dev/null 2>&1
-       killall -0 -q smbd winbindd && {
-           sleep 1
-           # make absolutely sure samba is dead
-           killall -q -9 smbd winbindd
+
+       # restart the winbind service
+       [ "$CTDB_MANAGES_WINBIND" = "yes" ] && {
+               service winbind stop > /dev/null 2>&1
+               killall -0 -q smbd winbindd && {
+                   sleep 1
+                   # make absolutely sure samba is dead
+                   killall -q -9 smbd winbindd
+               }
+               service winbind start
        }
 
        # start Samba service. Start it reniced, as under very heavy load 
        # the number of smbd processes will mean that it leaves few cycles for
        # anything else
-       service winbind start
        nice service smb start
        ;;
        
@@ -62,7 +66,11 @@ case $cmd in
      shutdown)
        # shutdown Samba when ctdb goes down
        service smb stop
-       service winbind stop
+
+       # stop the winbind service
+       [ "$CTDB_MANAGES_WINBIND" = "yes" ] && {
+               service winbind stop
+       }
        ;;
 
      monitor)
@@ -89,7 +97,9 @@ case $cmd in
        ctdb_check_tcp_ports "Samba" $smb_ports
 
        # check winbind is OK
-       ctdb_check_command "winbind" "wbinfo -p"
+       [ "$CTDB_MANAGES_WINBIND" = "yes" ] && {
+               ctdb_check_command "winbind" "wbinfo -p"
+       }
        ;;
 
 esac
index 0b5be7f6bc1df8164f3d620e7e86e4b3dce61f64..08fc683ab8b75d16fbaaaea4be32c8f2b4e61253 100644 (file)
@@ -64,7 +64,7 @@ A suitable file can be found in the dbench distribution at http://samba.org/ftp/
 
 <h3>CTDB_MANAGES_SAMBA</h3>
 This is a parameter in /etc/sysconfig/ctdb<br><br>
-When this parameter is set to "yes" CTDB will start/stop/restart the localo samba daemon as the cluster configuration changes.<br><br>
+When this parameter is set to "yes" CTDB will start/stop/restart the local samba daemon as the cluster configuration changes.<br><br>
 When this parameter is set you should also make sure that samba is NOT started by default by the linux system when it boots:
 <pre>
   chkconfig samba off
@@ -77,5 +77,20 @@ Example:
 
 It is strongly recommended that you set this parameter to "yes" if you intend to use clustered samba.
 
+<h3>CTDB_MANAGES_WINBIND</h3>
+This is a parameter in /etc/sysconfig/ctdb<br><br>
+When this parameter is set to "yes" CTDB will start/stop/restart the local winbind daemon as the cluster configuration changes.<br><br>
+When this parameter is set you should also make sure that winbind is NOT started by default by the linux system when it boots:
+<pre>
+  chkconfig winbind off
+</pre>
+
+Example:
+<pre>
+  CTDB_MANAGES_WINBIND="yes"
+</pre>
+
+It is strongly recommended that you set this parameter to "yes" if you intend to use clustered samba.
+
 <!--#include virtual="footer.html" -->