Rev 681: - merge from ronnie in http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Sun Nov 18 04:14:55 GMT 2007
------------------------------------------------------------
revno: 681
revision-id:tridge at samba.org-20071118041454-hfg5axhxnc1nq8cd
parent: tridge at samba.org-20071118040126-cru64xctvwc45ztu
parent: sahlberg at ronnie-20071116023727-gcy4lvutf8p3gskl
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge.stable
timestamp: Sun 2007-11-18 15:14:54 +1100
message:
- merge from ronnie
- auto-detect CTDB_MANAGES_WINBIND from smb.conf if not set
modified:
config/ctdb.sysconfig ctdb.sysconfig-20070527204758-biuh7znabuwan3zn-7
config/events.d/40.vsftpd 40.vsftpd-20070605080716-mih15mjbgsjt7niv-1
config/events.d/50.samba samba-20070601105340-vlcvnp6euoj3zdwy-3
config/events.d/60.nfs nfs-20070601141008-hy3h4qgbk1jd2jci-1
web/samba.html samba.html-20070608233143-cblz5ezz3qu11089-1
------------------------------------------------------------
revno: 432.1.348
revision-id:sahlberg at ronnie-20071116023727-gcy4lvutf8p3gskl
parent: sahlberg at ronnie-20071114195602-e1yc8khda9u9pm8c
committer: Ronnie Sahlberg <sahlberg at ronnie>
branch nick: ctdb
timestamp: Fri 2007-11-16 13:37:27 +1100
message:
from Christian A
when monitoring that all nfs shares are available, allow both ' ' and
'\t' characters to separate the exported directory from the options
in /etc/exports
modified:
config/events.d/60.nfs nfs-20070601141008-hy3h4qgbk1jd2jci-1
------------------------------------------------------------
revno: 432.1.347
revision-id:sahlberg at ronnie-20071114195602-e1yc8khda9u9pm8c
parent: sahlberg at ronnie-20071114051752-4swhksmab0n0s2lc
committer: Ronnie Sahlberg <sahlberg at ronnie>
branch nick: ctdb
timestamp: Thu 2007-11-15 06:56:02 +1100
message:
only check port 21 when monitoring vsftpd
modified:
config/events.d/40.vsftpd 40.vsftpd-20070605080716-mih15mjbgsjt7niv-1
------------------------------------------------------------
revno: 432.1.346
revision-id:sahlberg at ronnie-20071114051752-4swhksmab0n0s2lc
parent: sahlberg at ronnie-20071113022700-svwaecjiyxxxo6qq
committer: Ronnie Sahlberg <sahlberg at ronnie>
branch nick: ctdb
timestamp: Wed 2007-11-14 16:17:52 +1100
message:
add CTDB_MANAGES_WINBIND to /etc/sysconfig/ctdb to allow ctdb to be used
in environments where samba is used without winbind
modified:
config/ctdb.sysconfig ctdb.sysconfig-20070527204758-biuh7znabuwan3zn-7
config/events.d/50.samba samba-20070601105340-vlcvnp6euoj3zdwy-3
web/samba.html samba.html-20070608233143-cblz5ezz3qu11089-1
------------------------------------------------------------
revno: 432.1.345
revision-id:sahlberg at ronnie-20071113022700-svwaecjiyxxxo6qq
parent: sahlberg at ronnie-20071112203858-us2mn5z7coih37ws
parent: tridge at samba.org-20071112232806-oa7mfrcng3ku8lvu
committer: Ronnie Sahlberg <sahlberg at ronnie>
branch nick: ctdb
timestamp: Tue 2007-11-13 13:27:00 +1100
message:
merge from tridge
modified:
server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
tests/ctdbd.sh ctdbd.sh-20070411085038-phusiewluwzyqjpc-2
tests/fetch.sh fetch.sh-20070405031756-lomzqpjyqg3xd1kv-1
tests/persistent.sh persistent.sh-20070921022335-ytbefhrr45n2mc3j-1
tests/start_daemons.sh start_daemons.sh-20070604074603-fbb8x90srun04xn0-1
------------------------------------------------------------
revno: 432.1.344
revision-id:sahlberg at ronnie-20071112203858-us2mn5z7coih37ws
parent: sahlberg at ronnie-20071112012820-iq8dxbpm4mzw7lox
parent: tridge at samba.org-20071112021015-2vs75yqqbllm60db
committer: Ronnie Sahlberg <sahlberg at ronnie>
branch nick: ctdb
timestamp: Tue 2007-11-13 07:38:58 +1100
message:
merge from tridge
modified:
server/ctdb_monitor.c ctdb_monitor.c-20070518100625-8jf4ft1mjzmb22ck-1
------------------------------------------------------------
revno: 432.1.343
revision-id:sahlberg at ronnie-20071112012820-iq8dxbpm4mzw7lox
parent: sahlberg at ronnie-20071111232335-ud6eqansb4eoyfr1
parent: tridge at samba.org-20071111235311-be18d7889z943fa2
committer: Ronnie Sahlberg <sahlberg at ronnie>
branch nick: ctdb
timestamp: Mon 2007-11-12 12:28:20 +1100
message:
merge from tridge
modified:
include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
server/ctdb_daemon.c ctdb_daemon.c-20070409200331-3el1kqgdb9m4ib0g-1
server/ctdb_monitor.c ctdb_monitor.c-20070518100625-8jf4ft1mjzmb22ck-1
web/download.html getting_the_code.htm-20070608005948-wn5ag3uowh6dbnwr-1
------------------------------------------------------------
revno: 432.1.342
revision-id:sahlberg at ronnie-20071111232335-ud6eqansb4eoyfr1
parent: sahlberg at ronnie-20071105023611-hfmjpmn38j7mcklt
committer: Ronnie Sahlberg <sahlberg at ronnie>
branch nick: ctdb
timestamp: Mon 2007-11-12 10:23:35 +1100
message:
revert 773
modified:
include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
server/ctdb_persistent.c ctdb_persistent.c-20070920053845-u2ggm5relkdor3xg-1
server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
server/ctdb_server.c ctdb.c-20061127094323-t50f58d65iaao5of-2
server/ctdb_takeover.c ctdb_takeover.c-20070525071636-a5n1ihghjtppy08r-2
server/ctdb_tunables.c ctdb_tunables.c-20070604095258-4m34d7cm1qa7yos9-1
------------------------------------------------------------
revno: 432.1.341
revision-id:sahlberg at ronnie-20071105023611-hfmjpmn38j7mcklt
parent: sahlberg at ronnie-20071031220014-mh0ivmg9pf9ll3hv
committer: Ronnie Sahlberg <sahlberg at ronnie>
branch nick: ctdb
timestamp: Mon 2007-11-05 13:36:11 +1100
message:
add a new tunable "CheckNodesFile" that when set to 0 will disable the
check in the recovery daemon that all nodes are using the same
/etc/ctdb/nodes file.
Also add some more missing checks that the pnn used is a valid pnn
before using it to dereferencing the ctdb->nodes array
This is useful since it allows us to add more physical nodes to a an
existing cluster without having to bring down the entire cluster.
The to add an additional node to an existing cluster would then be
1, on all nodes set CheckNodesFile=0 using 'ctdb setvar'
2, on all nodes add CTDB_SET_CheckNodesFile=0 to /etc/sysconfig/ctdb
For each each node, one at a time :
3, use 'ctdb disable' to stop the hosted services
4, service ctdb stop
5, service ctdb start
Once all nodes have been restarted
6, on all nodes remove CTDB_SET_CheckNodesFile=0 from
/etc/sysconfig/ctdb
7, on all nodes set CheckNodesFile=0 using 'ctdb setvar'
8, configure and start up the new node
During this procedure, only one node at a time was brought
down/restarted and was so only for a short period.
modified:
include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
server/ctdb_persistent.c ctdb_persistent.c-20070920053845-u2ggm5relkdor3xg-1
server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
server/ctdb_server.c ctdb.c-20061127094323-t50f58d65iaao5of-2
server/ctdb_takeover.c ctdb_takeover.c-20070525071636-a5n1ihghjtppy08r-2
server/ctdb_tunables.c ctdb_tunables.c-20070604095258-4m34d7cm1qa7yos9-1
------------------------------------------------------------
revno: 432.1.340
revision-id:sahlberg at ronnie-20071031220014-mh0ivmg9pf9ll3hv
parent: root at ronnie-20071029013445-nxx5r1xhnn10k397
parent: tridge at samba.org-20071029024312-raaxbvb1gvmd22b0
parent: tridge at samba.org-20071029231943-0p5319r0hc3c7d4a
committer: Ronnie Sahlberg <sahlberg at ronnie>
branch nick: ctdb
timestamp: Thu 2007-11-01 09:00:14 +1100
message:
merge from tridge
modified:
packaging/RPM/ctdb.spec ctdb.spec-20070527204758-biuh7znabuwan3zn-3
tools/ctdb_diagnostics ctdb_diagnostics-20070905041904-9d9r1qnt1j9qiwiz-1
=== modified file 'config/ctdb.sysconfig'
--- a/config/ctdb.sysconfig 2007-10-09 23:42:32 +0000
+++ b/config/ctdb.sysconfig 2007-11-18 04:14:54 +0000
@@ -33,6 +33,10 @@
# default is to not manage Samba
# CTDB_MANAGES_SAMBA=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
+
# 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)
=== modified file 'config/events.d/40.vsftpd'
--- a/config/events.d/40.vsftpd 2007-10-26 04:53:09 +0000
+++ b/config/events.d/40.vsftpd 2007-11-14 19:56:02 +0000
@@ -42,7 +42,7 @@
;;
monitor)
- ctdb_check_tcp_ports "ftp" 20 21
+ ctdb_check_tcp_ports "ftp" 21
;;
esac
=== modified file 'config/events.d/50.samba'
--- a/config/events.d/50.samba 2007-09-24 00:00:14 +0000
+++ b/config/events.d/50.samba 2007-11-18 04:14:54 +0000
@@ -16,6 +16,20 @@
SAMBA_CLEANUP_PERIOD=10
}
+
+# autodetect use of winbind if not set in config file
+[ -z "$CTDB_MANAGES_WINBIND" ] && {
+ secmode=`testparm -s --parameter-name=security 2> /dev/null`
+ case $secmode in
+ ADS|DOMAIN)
+ CTDB_MANAGES_WINBIND="yes";
+ ;;
+ *)
+ CTDB_MANAGES_WINBIND="no";
+ ;;
+ esac
+}
+
###########################
# periodic cleanup function
periodic_cleanup() {
@@ -32,17 +46,21 @@
# 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 +80,11 @@
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 +111,9 @@
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
=== modified file 'config/events.d/60.nfs'
--- a/config/events.d/60.nfs 2007-10-23 02:35:43 +0000
+++ b/config/events.d/60.nfs 2007-11-16 02:37:27 +0000
@@ -69,7 +69,7 @@
ctdb_check_rpc "NFS" 100003 3
# and that its directories are available
- nfs_dirs=`grep -v '^#' < /etc/exports | cut -d' ' -f1`
+ nfs_dirs=$(grep -v '^#' < /etc/exports | awk {'print $1;'})
ctdb_check_directories "nfs" $nfs_dirs
# check that lockd responds to rpc requests
=== modified file 'web/samba.html'
--- a/web/samba.html 2007-06-12 04:43:26 +0000
+++ b/web/samba.html 2007-11-18 04:14:54 +0000
@@ -64,7 +64,7 @@
<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,21 @@
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 in DOMAIN or ADS security mode.
+
<!--#include virtual="footer.html" -->
More information about the samba-cvs
mailing list