ctdb-recoverd: Get remote nodemaps earlier
authorMartin Schwenke <martin@meltin.net>
Thu, 13 Jun 2019 17:51:01 +0000 (03:51 +1000)
committerKarolin Seeger <kseeger@samba.org>
Tue, 25 Aug 2020 13:57:29 +0000 (13:57 +0000)
update_local_flags() will be changed to use these nodemaps.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14466
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 910a0b3b747a987ba69b6a0b6256e964b7d85dfe)

ctdb/server/ctdb_recoverd.c

index 138177a91875bf3eb03be4d7b6affa862e72ccf4..18f40f25e906a24b0d9e2d2e876f103936132b87 100644 (file)
@@ -2555,6 +2555,13 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
        }
 
 
+       /* Get the nodemaps for all connected remote nodes */
+       ret = get_remote_nodemaps(rec, mem_ctx, &remote_nodemaps);
+       if (ret != 0) {
+               DBG_ERR("Failed to read remote nodemaps\n");
+               return;
+       }
+
        /* ensure our local copies of flags are right */
        ret = update_local_flags(rec, nodemap);
        if (ret != 0) {
@@ -2631,13 +2638,6 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
                goto takeover_run_checks;
        }
 
-       /* Get the nodemaps for all connected remote nodes */
-       ret = get_remote_nodemaps(rec, mem_ctx, &remote_nodemaps);
-       if (ret != 0) {
-               DBG_ERR("Failed to read remote nodemaps\n");
-               return;
-       }
-
        /* verify that all other nodes have the same nodemap as we have
        */
        for (j=0; j<nodemap->num; j++) {