From: Martin Schwenke Date: Tue, 5 May 2020 13:49:05 +0000 (+1000) Subject: ctdb-recoverd: Do not retrieve nodemap from recovery master X-Git-Tag: samba-4.11.14~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94a9842af6c65c360053f21680c9da862f8338c5;p=thirdparty%2Fsamba.git ctdb-recoverd: Do not retrieve nodemap from recovery master It is already in rec->nodemap. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs (cherry picked from commit 9475ab044161e687b9ced3a477746393565b49b1) --- diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index 659b2019b77..049b6841714 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; }