diff options
author | Martin Schwenke <martin@meltin.net> | 2019-06-15 07:20:19 +1000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2020-08-27 10:48:07 +0000 |
commit | abc8222fa5d4d01d35e554066b1da232ea9c5efc (patch) | |
tree | a95b93112916bdb6470577b0c782104851a4a8c3 | |
parent | 6fc2ec1653a4867fe2321b03d752571bd337a605 (diff) | |
download | samba-abc8222fa5d4d01d35e554066b1da232ea9c5efc.tar.gz |
ctdb-recoverd: Use update_flags_on_all_nodes()
This is clearer than using the MODFLAGS control directly.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 915d24ac12d27c21649d9e64d201d9df9d583129)
-rw-r--r-- | ctdb/server/ctdb_recoverd.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index e525e048983..bbd375a897e 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -533,19 +533,13 @@ static int update_local_flags(struct ctdb_recoverd *rec, struct ctdb_node_map_ol remote_flags = remote_nodemap->nodes[j].flags; if (local_flags != remote_flags) { - /* We should tell our daemon about this so it - updates its flags or else we will log the same - message again in the next iteration of recovery. - Since we are the recovery master we can just as - well update the flags on all nodes. - */ - ret = ctdb_ctrl_modflags(ctdb, - CONTROL_TIMEOUT(), - nodemap->nodes[j].pnn, - remote_flags, - ~remote_flags); + ret = update_flags_on_all_nodes(rec, + nodemap->nodes[j].pnn, + remote_flags); if (ret != 0) { - DEBUG(DEBUG_ERR, (__location__ " Unable to update nodeflags on remote nodes\n")); + DBG_ERR( + "Unable to update flags on remote nodes\n"); + talloc_free(mem_ctx); return -1; } |