Rev 403: use our own netmask when deciding if we should takeover a IP, not the other nodes in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Wed May 30 06:11:40 GMT 2007


------------------------------------------------------------
revno: 403
revision-id: tridge at samba.org-20070530061139-3n42c8eoi2nk007e
parent: tridge at samba.org-20070530054325-s8i707ydww0omcor
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Wed 2007-05-30 16:11:39 +1000
message:
  use our own netmask when deciding if we should takeover a IP, not the other nodes
  - check if ctdb dies while waiting for the startup event
modified:
  takeover/ctdb_takeover.c       ctdb_takeover.c-20070525071636-a5n1ihghjtppy08r-2
  tools/events                   events-20070529030121-04fjh63cxfh8v1pj-1
=== modified file 'takeover/ctdb_takeover.c'
--- a/takeover/ctdb_takeover.c	2007-05-29 06:23:47 +0000
+++ b/takeover/ctdb_takeover.c	2007-05-30 06:11:39 +0000
@@ -318,8 +318,9 @@
 			     j != i;
 			     j=(j+1)%nodemap->num) {
 				if ((nodemap->nodes[j].flags & NODE_FLAGS_CONNECTED) &&
-				    ctdb_same_subnet(ctdb->nodes[j]->public_address, ctdb->nodes[i]->public_address, 
-						     ctdb->nodes[i]->public_netmask_bits)) {
+				    ctdb_same_subnet(ctdb->nodes[j]->public_address, 
+						     ctdb->nodes[i]->public_address, 
+						     ctdb->nodes[j]->public_netmask_bits)) {
 					ctdb->nodes[i]->takeover_vnn = nodemap->nodes[j].vnn;
 					break;
 				}

=== modified file 'tools/events'
--- a/tools/events	2007-05-30 02:37:03 +0000
+++ b/tools/events	2007-05-30 06:11:39 +0000
@@ -18,6 +18,10 @@
 	  	      /usr/bin/nc -z 127.0.0.1 $p || all_ok=0
 		  done
 		  [ $all_ok -eq 1 ] || sleep 1
+		  /usr/bin/ctdb status > /dev/null 2>&1 || {
+	  		echo "ctdb daemon has died. Exiting event startup"
+			exit 1
+		  }
           done
 	  echo "Local tcp services on $CTDB_WAIT_TCP_PORTS are up"
 	}



More information about the samba-cvs mailing list