]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
also verify that the generation id is the same on all the nodes and if
authorRonnie Sahlberg <sahlberg@ronnie>
Fri, 4 May 2007 01:57:45 +0000 (11:57 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Fri, 4 May 2007 01:57:45 +0000 (11:57 +1000)
not, trigger a recovery

(This used to be ctdb commit 46b8a66ee70419c153acf45eeec88c1fc8f230ce)

ctdb/direct/recoverd.c

index c427f077e52367a9456f54ac834f1bad7015f51b..9203faf70ffa14c7a658faa966346efb88ce1344 100644 (file)
@@ -180,7 +180,9 @@ again:
        }
 
        
-       /* verify that all other nodes have the same vnnmap */
+       /* verify that all other nodes have the same vnnmap
+          and are from the same generation
+        */
        for (j=0; j<nodemap->num; j++) {
                if (!(nodemap->nodes[j].flags&NODE_FLAGS_CONNECTED)) {
                        continue;
@@ -195,6 +197,13 @@ again:
                        goto again;
                }
 
+               /* verify the vnnmap generation is the same */
+               if (vnnmap->generation != remote_vnnmap->generation) {
+                       printf("Remote node %d has different generation of vnnmap. %d vs %d (ours)\n", nodemap->nodes[j].vnn, remote_vnnmap->generation, vnnmap->generation);
+                       do_recovery(ctdb, ev);
+                       goto again;
+               }
+
                /* verify the vnnmap size is the same */
                if (vnnmap->size != remote_vnnmap->size) {
                        printf("Remote node %d has different size of vnnmap. %d vs %d (ours)\n", nodemap->nodes[j].vnn, remote_vnnmap->size, vnnmap->size);