1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb-daemon: ensure restart() callback is called in half-connected state

If NODE_FLAGS_DISCONNECTED is set the node can be in half-connected state. With
this change we ensure to restart the transport for this case.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14295

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Ralph Boehme 2020-02-29 12:26:19 +01:00 committed by Martin Schwenke
parent 808d6c0c53
commit 6a4fa0785f

View File

@ -301,6 +301,12 @@ done:
*/
void ctdb_node_dead(struct ctdb_node *node)
{
if (node->ctdb->methods == NULL) {
DEBUG(DEBUG_ERR,(__location__ " Can not restart transport while shutting down daemon.\n"));
return;
}
node->ctdb->methods->restart(node);
if (node->flags & NODE_FLAGS_DISCONNECTED) {
DEBUG(DEBUG_INFO,("%s: node %s is already marked disconnected: %u connected\n",
node->ctdb->name, node->name,
@ -315,13 +321,6 @@ void ctdb_node_dead(struct ctdb_node *node)
DEBUG(DEBUG_ERR,("%s: node %s is dead: %u connected\n",
node->ctdb->name, node->name, node->ctdb->num_connected));
ctdb_daemon_cancel_controls(node->ctdb, node);
if (node->ctdb->methods == NULL) {
DEBUG(DEBUG_ERR,(__location__ " Can not restart transport while shutting down daemon.\n"));
return;
}
node->ctdb->methods->restart(node);
}
/*