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)
committerMichael Adam <obnox@samba.org>
Mon, 26 Aug 2013 11:35:52 +0000 (13:35 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 8d622660a14c929e365d306147b378ea6ab92175)

server/ctdb_recoverd.c

index e9b297e39b4765533b197c1c142ceb71dbb0e586..5bc44c48aab868ab59e445502133d257bf483f2c 100644 (file)
@@ -2949,6 +2949,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) {
@@ -3027,9 +3030,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;