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 02:59:08 +0000 (12:59 +1000)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
server/ctdb_recoverd.c

index 04b1c906bc05945ec4b655dd55965c0dde0ab0cf..2f92e39a0b19faf570fdadc60dd532ef40eec96b 100644 (file)
@@ -3416,6 +3416,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) {
@@ -3494,9 +3497,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;