------------------------------------------------------------ revno: 468 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell <[EMAIL PROTECTED]> branch nick: tridge timestamp: Tue 2007-06-05 15:18:37 +1000 message: set close on exec on pipe in event scripts, so long running scripts don't hold the pipe modified: config/ctdb.sysconfig ctdb.sysconfig-20070527204758-biuh7znabuwan3zn-7 config/events.d/50.samba samba-20070601105340-vlcvnp6euoj3zdwy-3 config/events.d/59.nfslock nfslock-20070601105340-vlcvnp6euoj3zdwy-2 config/events.d/60.nfs nfs-20070601141008-hy3h4qgbk1jd2jci-1 takeover/system.c system.c-20070525071636-a5n1ihghjtppy08r-3 === modified file 'config/ctdb.sysconfig' --- a/config/ctdb.sysconfig 2007-06-04 12:13:59 +0000 +++ b/config/ctdb.sysconfig 2007-06-05 05:18:37 +0000 @@ -20,6 +20,11 @@ # default is to not manage Samba # CTDB_MANAGES_SAMBA=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) +# ulimit -n 10000 + # the NODES file must be specified or ctdb won't start # it should contain a list of IPs that ctdb will use # it must be exactly the same on all cluster nodes
=== modified file 'config/events.d/50.samba' --- a/config/events.d/50.samba 2007-06-04 05:09:03 +0000 +++ b/config/events.d/50.samba 2007-06-05 05:18:37 +0000 @@ -17,6 +17,10 @@ smb_dirs=`testparm -st 2> /dev/null | egrep '^\s*path = ' | cut -d= -f2` ctdb_wait_directories "Samba" $smb_dirs + # make sure samba is not already started + service smb stop > /dev/null 2>&1 + service winbind stop > /dev/null 2>&1 + # start Samba service service smb start service winbind start === modified file 'config/events.d/59.nfslock' --- a/config/events.d/59.nfslock 2007-06-04 05:09:03 +0000 +++ b/config/events.d/59.nfslock 2007-06-05 05:18:37 +0000 @@ -16,6 +16,8 @@ /bin/mkdir -p /etc/ctdb/state/statd/ip ctdb_wait_directories "nfslock" "$STATD_SHARED_DIRECTORY" + # make sure the service is stopped first + service nfslock stop > /dev/null 2>&1 service nfslock start ;; === modified file 'config/events.d/60.nfs' --- a/config/events.d/60.nfs 2007-06-04 13:54:22 +0000 +++ b/config/events.d/60.nfs 2007-06-05 05:18:37 +0000 @@ -17,6 +17,8 @@ nfs_dirs=`grep -v '^#' < /etc/exports | cut -d' ' -f1` ctdb_wait_directories "NFS" $nfs_dirs + # make sure nfs is stopped before we start it, or it may get a bind error + service nfs stop > /dev/null 2>&1 service nfs start ;; === modified file 'takeover/system.c' --- a/takeover/system.c 2007-06-04 13:52:12 +0000 +++ b/takeover/system.c 2007-06-05 05:18:37 +0000 @@ -386,6 +386,7 @@ if (state->child == 0) { close(state->fd[0]); ctdb_set_realtime(false); + set_close_on_exec(state->fd[1]); va_start(ap, fmt); ret = ctdb_event_script_v(ctdb, fmt, ap); va_end(ap);