mirror of
https://github.com/samba-team/samba.git
synced 2025-02-25 17:57:42 +03:00
ctdb-recoverd: Update the local node map before pushing out flags
The resulting code structure looks a little weird. However, there is another condition that requires the flags to be pushed that will be inserted before the continue statement in a subsequent commit.. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14784 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
82a075d4d7
commit
620d078714
@ -568,16 +568,6 @@ static int update_flags(struct ctdb_recoverd *rec,
|
||||
remote_flags = remote_nodemap->nodes[j].flags;
|
||||
|
||||
if (local_flags != remote_flags) {
|
||||
ret = update_flags_on_all_nodes(rec,
|
||||
remote_pnn,
|
||||
remote_flags);
|
||||
if (ret != 0) {
|
||||
DBG_ERR(
|
||||
"Unable to update flags on remote nodes\n");
|
||||
talloc_free(mem_ctx);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Update the local copy of the flags in the
|
||||
* recovery daemon.
|
||||
@ -588,6 +578,21 @@ static int update_flags(struct ctdb_recoverd *rec,
|
||||
remote_flags,
|
||||
local_flags);
|
||||
nodemap->nodes[j].flags = remote_flags;
|
||||
local_flags = remote_flags;
|
||||
goto push;
|
||||
}
|
||||
|
||||
continue;
|
||||
|
||||
push:
|
||||
D_NOTICE("Pushing updated flags for node %u (0x%x)\n",
|
||||
remote_pnn,
|
||||
local_flags);
|
||||
ret = update_flags_on_all_nodes(rec, remote_pnn, local_flags);
|
||||
if (ret != 0) {
|
||||
DBG_ERR("Unable to update flags on remote nodes\n");
|
||||
talloc_free(mem_ctx);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
talloc_free(mem_ctx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user