[SCM] CTDB repository - branch 1.2 updated - ctdb-1.9.1-466-g0267ff4

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


The branch, 1.2 has been updated
       via  0267ff4e017243aeef11adcb737eeccb475578a8 (commit)
      from  b8bc053f9b5ef3d33f3967d2a3c2e9319a8fea28 (commit)

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


- Log -----------------------------------------------------------------
commit 0267ff4e017243aeef11adcb737eeccb475578a8
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 1dc051c..d6493bd 100755
--- a/config/ctdb.init
+++ b/config/ctdb.init
@@ -219,6 +219,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: "
 
@@ -229,6 +239,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
@@ -309,6 +323,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
@@ -322,6 +339,7 @@ stop() {
 	    echo ""
 	    ;;
     esac
+
     return $RETVAL
 }
 


-- 
CTDB repository


More information about the samba-cvs mailing list