From: Ronnie Sahlberg Date: Mon, 9 Jul 2007 02:33:00 +0000 (+1000) Subject: when checking the nodemap flags for consitency while monitoring the X-Git-Tag: tevent-0.9.20~348^2~2462^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3499c8c673e468be589a5ef6cce31b08d8b489cc;p=thirdparty%2Fsamba.git when checking the nodemap flags for consitency while monitoring the cluster, we cant check that both the BANNED and the DISCONNECTED flags are both set at the same time since if a node becomes banned just before it is DISCONNECTED there is no guarantee that all other nodes will have seen the BANNED flag. So we must first check the DISCONNECTED flag only and only if the DISCONNECTED flag is not set should we check the BANNED flag. othervise this can cause a recovery loop while some nodes thing the disconnected node is DISCONNECTED|BANNED and other think it is just DISCONNECTED (This used to be ctdb commit 0967b2fff376ead631d98e78b3a97253fc109c69) --- diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index ef867efac12..19e843ef3f2 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -1325,9 +1325,17 @@ again: vnnmap, nodemap->nodes[j].vnn); goto again; } - if ((remote_nodemap->nodes[i].flags & NODE_FLAGS_INACTIVE) != - (nodemap->nodes[i].flags & NODE_FLAGS_INACTIVE)) { - DEBUG(0, (__location__ " Remote node:%u has different nodemap flags for %d (0x%x vs 0x%x)\n", + if ((remote_nodemap->nodes[i].flags & NODE_FLAGS_DISCONNECTED) != + (nodemap->nodes[i].flags & NODE_FLAGS_DISCONNECTED)) { + DEBUG(0, (__location__ " Remote node:%u has different nodemap disconnected flag for %d (0x%x vs 0x%x)\n", + nodemap->nodes[j].vnn, i, + remote_nodemap->nodes[i].flags, nodemap->nodes[i].flags)); + do_recovery(rec, mem_ctx, vnn, num_active, nodemap, + vnnmap, nodemap->nodes[j].vnn); + goto again; + } else if ((remote_nodemap->nodes[i].flags & NODE_FLAGS_BANNED) != + (nodemap->nodes[i].flags & NODE_FLAGS_BANNED)) { + DEBUG(0, (__location__ " Remote node:%u has different nodemap banned flag for %d (0x%x vs 0x%x)\n", nodemap->nodes[j].vnn, i, remote_nodemap->nodes[i].flags, nodemap->nodes[i].flags)); do_recovery(rec, mem_ctx, vnn, num_active, nodemap,