From 91405282ba4abad4ad8e8c5f7ee4c83c75f38280 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 3 May 2013 15:41:26 +1000 Subject: [PATCH] recoverd: Add debug message when dropping IPs in IP allocation Update tests accordingly. Signed-off-by: Martin Schwenke --- server/ctdb_takeover.c | 6 ++++++ tests/takeover/det.001.sh | 6 ++++++ tests/takeover/det.002.sh | 3 +++ tests/takeover/nondet.001.sh | 6 ++++++ tests/takeover/nondet.002.sh | 3 +++ tests/takeover/scripts/local.sh | 5 +---- 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/server/ctdb_takeover.c b/server/ctdb_takeover.c index 44393a71..dfd62684 100644 --- a/server/ctdb_takeover.c +++ b/server/ctdb_takeover.c @@ -2083,6 +2083,9 @@ static void unassign_unsuitable_ips(struct ctdb_context *ctdb, continue; } if (nodemap->nodes[tmp_ip->pnn].flags & mask) { + DEBUG(DEBUG_DEBUG,("Unassign IP: %s from %d\n", + ctdb_addr_to_str(&(tmp_ip->addr)), + tmp_ip->pnn)); tmp_ip->pnn = -1; } } @@ -2096,6 +2099,9 @@ static void unassign_unsuitable_ips(struct ctdb_context *ctdb, } if (can_node_serve_ip(ctdb, tmp_ip->pnn, tmp_ip) != 0) { /* this node can not serve this ip. */ + DEBUG(DEBUG_DEBUG,("Unassign IP: %s from %d\n", + ctdb_addr_to_str(&(tmp_ip->addr)), + tmp_ip->pnn)); tmp_ip->pnn = -1; } } diff --git a/tests/takeover/det.001.sh b/tests/takeover/det.001.sh index dec70103..2387f12f 100755 --- a/tests/takeover/det.001.sh +++ b/tests/takeover/det.001.sh @@ -6,6 +6,12 @@ define_test "3 nodes, 1 healthy" required_result <&1) -- 2.34.1