1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

ctdb-tools: Stop deleted nodes from influencing ctdb nodestatus exit code

Deleted nodes should simply be ignored.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14129
RN: Stop deleted nodes from influencing ctdb nodestatus exit code

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 32b5ceb31936ec5447362236c1809db003561d29)

Autobuild-User(v4-10-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-10-test): Fri Sep 20 23:03:22 UTC 2019 on sn-devel-144
This commit is contained in:
Martin Schwenke 2019-08-13 21:42:15 +10:00 committed by Karolin Seeger
parent 1d749a02fc
commit 1b4ccd961f

@ -5562,7 +5562,13 @@ static int control_nodestatus(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
ret = 0;
for (i=0; i<nodemap->num; i++) {
ret |= nodemap->node[i].flags;
uint32_t flags = nodemap->node[i].flags;
if ((flags & NODE_FLAGS_DELETED) != 0) {
continue;
}
ret |= flags;
}
return ret;