diff options
author | Amitay Isaacs <amitay@gmail.com> | 2013-07-22 17:26:28 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2013-07-30 15:34:32 +1000 |
commit | f1f787ccac754dd4b686afdabc626417a8332e17 (patch) | |
tree | 3f4d8f255a7f215c635c9788b0f1d417901330a0 /ctdb | |
parent | 16b519c51b27f562b0a0f5a6fc8d20c2eb0b8978 (diff) | |
download | samba-f1f787ccac754dd4b686afdabc626417a8332e17.tar.gz |
recoverd: Assemble up-to-date node flags information from remote nodes
Currently nodemap used by recovery master is the one obtained from the local
node. This information may have been updated while processing main loop.
Before comparing node flags on all the nodes, create up-to-date node flags
information based on the information received from all the nodes.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit fcf77dec5af973a0e32f3999bc012053a6f47a96)
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/ctdb_recoverd.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index bf8d8cc960a..57bc5557678 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -3716,6 +3716,23 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec, return; } } + } + + /* + * Update node flags obtained from each active node. This ensure we have + * up-to-date information for all the nodes. + */ + for (j=0; j<nodemap->num; j++) { + if (nodemap->nodes[j].flags & NODE_FLAGS_INACTIVE) { + continue; + } + nodemap->nodes[j].flags = remote_nodemaps[j]->nodes[j].flags; + } + + for (j=0; j<nodemap->num; j++) { + if (nodemap->nodes[j].flags & NODE_FLAGS_INACTIVE) { + continue; + } /* verify the flags are consistent */ |