diff options
author | Martin Schwenke <martin@meltin.net> | 2020-05-05 23:49:05 +1000 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2020-07-24 04:41:25 +0000 |
commit | 9475ab044161e687b9ced3a477746393565b49b1 (patch) | |
tree | 3c65040ae48852a8f65506c83473afeb62d276a6 /ctdb | |
parent | 0c6a7db3ba84b8355359b0a8c52690b234bb866d (diff) | |
download | samba-9475ab044161e687b9ced3a477746393565b49b1.tar.gz |
ctdb-recoverd: Do not retrieve nodemap from recovery master
It is already in rec->nodemap.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/ctdb_recoverd.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index e24a4578a2d..71be10d81dc 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -437,27 +437,13 @@ static int update_flags_on_all_nodes(struct ctdb_recoverd *rec, struct ctdb_node_map_old *nodemap=NULL; struct ctdb_node_flag_change c; TALLOC_CTX *tmp_ctx = talloc_new(ctdb); - uint32_t recmaster; uint32_t *nodes; int ret; - /* find the recovery master */ - ret = ctdb_ctrl_getrecmaster(ctdb, tmp_ctx, timeout, CTDB_CURRENT_NODE, &recmaster); - if (ret != 0) { - DEBUG(DEBUG_ERR, (__location__ " Unable to get recmaster from local node\n")); - talloc_free(tmp_ctx); - return ret; - } + nodemap = rec->nodemap; - /* read the node flags from the recmaster */ - ret = ctdb_ctrl_getnodemap(ctdb, timeout, recmaster, tmp_ctx, &nodemap); - if (ret != 0) { - DBG_ERR("Unable to get nodemap from node %u\n", recmaster); - talloc_free(tmp_ctx); - return -1; - } if (pnn >= nodemap->num) { - DBG_ERR("Nodemap from recmaster does not contain node %d\n", pnn); + DBG_ERR("Nodemap does not contain node %d\n", pnn); talloc_free(tmp_ctx); return -1; } |