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-9-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-9-test): Fri Sep 20 14:09:11 UTC 2019 on sn-devel-144
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;