[SCM] CTDB repository - branch master updated - ctdb-1.10-337-g8de5513

Ronnie Sahlberg sahlberg at samba.org
Wed Aug 10 19:58:26 MDT 2011


The branch, master has been updated
       via  8de5513b3ad89711da845c7588d35b32e2f2acb6 (commit)
      from  9f10c5d48a08ffb3417f880c801aed2aa2dc1355 (commit)

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


- Log -----------------------------------------------------------------
commit 8de5513b3ad89711da845c7588d35b32e2f2acb6
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Aug 11 11:45:59 2011 +1000

    When starting and stopping ctdb through the init-script, make sure we first clear all public ips bvefore we start the daemon, in case they are still hanging around since a previous kill -9   and also make sure we drop them after we have stopped the deamon when shutting down
    
    CQ S1027550

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

Summary of changes:
 config/ctdb.init |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/ctdb.init b/config/ctdb.init
index 9e32bac..c65ad1a 100755
--- a/config/ctdb.init
+++ b/config/ctdb.init
@@ -215,6 +215,16 @@ wait_until_ready () {
 
 ctdbd=${CTDBD:-/usr/sbin/ctdbd}
 
+drop_all_public_ips() {
+    [ -z "$CTDB_PUBLIC_ADDRESSES" ] && {
+	return
+    }
+
+    cat $CTDB_PUBLIC_ADDRESSES | while read IP IFACE REST; do
+	ip addr del $IP dev $IFACE >/dev/null 2>/dev/null
+    done
+}
+
 start() {
     echo -n $"Starting ctdbd service: "
 
@@ -225,6 +235,10 @@ start() {
 
     build_ctdb_options
 
+    # make sure we drop any ips that might still be held if previous
+    # instance of ctdb got killed with -9 or similar
+    drop_all_public_ips
+
     check_persistent_databases || return $?
 
     if [ "$CTDB_SUPPRESS_COREFILE" = "yes" ]; then
@@ -305,6 +319,9 @@ stop() {
 	    pkill -9 -f $CTDB_BASE/events.d/
 	}
     done
+    # make sure all ips are dropped, pfkill -9 might leave them hanging around
+    drop_all_public_ips
+
     case $init_style in
 	suse)
 	    # re-set the return code to the recorded RETVAL in order
@@ -318,6 +335,7 @@ stop() {
 	    echo ""
 	    ;;
     esac
+
     return $RETVAL
 }
 


-- 
CTDB repository


More information about the samba-cvs mailing list