[SCM] CTDB repository - branch master updated - ctdb-1.13-19-gc262c29

Ronnie Sahlberg sahlberg at samba.org
Wed Mar 21 16:33:58 MDT 2012


The branch, master has been updated
       via  c262c29773d1608e7ce04bdfb7f4469df0a9637b (commit)
      from  668f3e88a9e5f598706952b7140547640c85a5ed (commit)

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


- Log -----------------------------------------------------------------
commit c262c29773d1608e7ce04bdfb7f4469df0a9637b
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Mar 22 09:22:35 2012 +1100

    NoIPFailback: Exclude nodes which have NoIPFailback as failback targets during reallocation

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

Summary of changes:
 server/ctdb_takeover.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_takeover.c b/server/ctdb_takeover.c
index dba375b..0ed5132 100644
--- a/server/ctdb_takeover.c
+++ b/server/ctdb_takeover.c
@@ -1175,6 +1175,12 @@ static int find_takeover_node(struct ctdb_context *ctdb,
 
 	pnn    = -1;
 	for (i=0;i<nodemap->num;i++) {
+		if (nodemap->nodes[i].flags & NODE_FLAGS_NOIPFAILBACK) {
+			/* This node is not allowed to takeover any addresses
+			*/
+			continue;
+		}
+
 		if (nodemap->nodes[i].flags & mask) {
 			/* This node is not healty and can not be used to serve
 			   a public address 
@@ -1465,6 +1471,11 @@ static bool basic_failback(struct ctdb_context *ctdb,
 				continue;
 			}
 
+			/* Only check nodes that are allowed to takeover an ip */
+			if (nodemap->nodes[i].flags & NODE_FLAGS_NOIPFAILBACK) {
+				continue;
+			}
+
 			/* only check nodes that can actually serve this ip */
 			if (can_node_serve_ip(ctdb, i, tmp_ip)) {
 				/* no it couldnt   so skip to the next node */
@@ -1640,6 +1651,11 @@ static void lcp2_allocate_unassigned(struct ctdb_context *ctdb,
 			}
 
 			for (dstnode=0; dstnode < nodemap->num; dstnode++) {
+				/* Only check nodes that are allowed to takeover an ip */
+				if (nodemap->nodes[dstnode].flags & NODE_FLAGS_NOIPFAILBACK) {
+					continue;
+				}
+
 				/* only check nodes that can actually serve this ip */
 				if (can_node_serve_ip(ctdb, dstnode, tmp_ip)) {
 					/* no it couldnt   so skip to the next node */
@@ -1748,6 +1764,12 @@ static bool lcp2_failback_candidate(struct ctdb_context *ctdb,
 			if (! newly_healthy[dstnode]) {
 				continue;
 			}
+
+			/* Only check nodes that are allowed to takeover an ip */
+			if (nodemap->nodes[dstnode].flags & NODE_FLAGS_NOIPFAILBACK) {
+				continue;
+			}
+
 			/* only check nodes that can actually serve this ip */
 			if (can_node_serve_ip(ctdb, dstnode, tmp_ip)) {
 				/* no it couldnt   so skip to the next node */


-- 
CTDB repository


More information about the samba-cvs mailing list