recoverd: Set node_flags information as soon as we get nodemap
authorAmitay Isaacs <amitay@gmail.com>
Fri, 28 Jun 2013 04:09:35 +0000 (14:09 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Tue, 2 Jul 2013 07:44:32 +0000 (17:44 +1000)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 8d622660a14c929e365d306147b378ea6ab92175)

server/ctdb_recoverd.c

index 92e0396837f4b91d968a8c8bedcd121dab3b5a19..1862248b46a5e6917e2ba98772ae83f439f59653 100644 (file)
@@ -3203,6 +3203,9 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
        }
        nodemap = rec->nodemap;
 
+       /* remember our own node flags */
+       rec->node_flags = nodemap->nodes[pnn].flags;
+
        /* update the capabilities for all nodes */
        ret = update_capabilities(ctdb, nodemap);
        if (ret != 0) {
@@ -3281,9 +3284,6 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
                return;
        }
 
-       /* remember our own node flags */
-       rec->node_flags = nodemap->nodes[pnn].flags;
-
        /* count how many active nodes there are */
        rec->num_active    = 0;
        rec->num_connected = 0;