]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
when checking the nodemap flags for consitency while monitoring the
authorRonnie Sahlberg <sahlberg@ronnie>
Mon, 9 Jul 2007 02:33:00 +0000 (12:33 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Mon, 9 Jul 2007 02:33:00 +0000 (12:33 +1000)
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)

ctdb/server/ctdb_recoverd.c

index ef867efac122a2d4bf98e26133924f37c0ea986a..19e843ef3f20b645065883b97495adbd87665523 100644 (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,