1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

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)
This commit is contained in:
Ronnie Sahlberg 2007-07-09 12:33:00 +10:00
parent 55a4a5def3
commit 3499c8c673

View File

@ -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,