mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
ctdb-tools: Fix spurious messages about deleted nodes being disconnected
The code was too "clever". The 4 different cases should be separate. The "node remains deleted" case doesn't need the IP address comparison (always 0.0.0.0) or the disconnected check. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
b57c77849a
commit
181658f5bb
@ -6279,8 +6279,15 @@ static bool sanity_check_nodes_file_changes(TALLOC_CTX *mem_ctx,
|
|||||||
should_abort = true;
|
should_abort = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((nodemap->nodes[i].flags & NODE_FLAGS_DELETED) ==
|
if (nodemap->nodes[i].flags & NODE_FLAGS_DELETED &&
|
||||||
(file_nodemap->nodes[i].flags & NODE_FLAGS_DELETED)) {
|
file_nodemap->nodes[i].flags & NODE_FLAGS_DELETED) {
|
||||||
|
/* Node remains deleted */
|
||||||
|
DEBUG(DEBUG_INFO,
|
||||||
|
("Node %u is unchanged (DELETED)\n",
|
||||||
|
nodemap->nodes[i].pnn));
|
||||||
|
} else if (!(nodemap->nodes[i].flags & NODE_FLAGS_DELETED) &&
|
||||||
|
!(file_nodemap->nodes[i].flags & NODE_FLAGS_DELETED)) {
|
||||||
|
/* Node not newly nor previously deleted */
|
||||||
if (!ctdb_same_ip(&nodemap->nodes[i].addr,
|
if (!ctdb_same_ip(&nodemap->nodes[i].addr,
|
||||||
&file_nodemap->nodes[i].addr)) {
|
&file_nodemap->nodes[i].addr)) {
|
||||||
DEBUG(DEBUG_ERR,
|
DEBUG(DEBUG_ERR,
|
||||||
@ -6301,9 +6308,8 @@ static bool sanity_check_nodes_file_changes(TALLOC_CTX *mem_ctx,
|
|||||||
nodemap->nodes[i].pnn));
|
nodemap->nodes[i].pnn));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
continue;
|
} else if (file_nodemap->nodes[i].flags & NODE_FLAGS_DELETED) {
|
||||||
}
|
/* Node is being deleted */
|
||||||
if (file_nodemap->nodes[i].flags & NODE_FLAGS_DELETED) {
|
|
||||||
DEBUG(DEBUG_NOTICE,
|
DEBUG(DEBUG_NOTICE,
|
||||||
("Node %u is DELETED\n",
|
("Node %u is DELETED\n",
|
||||||
nodemap->nodes[i].pnn));
|
nodemap->nodes[i].pnn));
|
||||||
@ -6315,6 +6321,7 @@ static bool sanity_check_nodes_file_changes(TALLOC_CTX *mem_ctx,
|
|||||||
should_abort = true;
|
should_abort = true;
|
||||||
}
|
}
|
||||||
} else if (nodemap->nodes[i].flags & NODE_FLAGS_DELETED) {
|
} else if (nodemap->nodes[i].flags & NODE_FLAGS_DELETED) {
|
||||||
|
/* Node was previously deleted */
|
||||||
DEBUG(DEBUG_NOTICE,
|
DEBUG(DEBUG_NOTICE,
|
||||||
("Node %u is UNDELETED\n", nodemap->nodes[i].pnn));
|
("Node %u is UNDELETED\n", nodemap->nodes[i].pnn));
|
||||||
have_changes = true;
|
have_changes = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user