mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-daemon: Don't delete connection information for released IP
As per the comment: If the IP address is hosted on this node then remove the connection. Otherwise this function has been called because the server IP address has been released to another node and the client has exited. This means that we should not delete the connection information. The takeover node processes connections too. This doesn't matter at the moment, since the empty connection list for an IP address that has been released will never be pushed to another node. However, it matters if the connection information is stored in a real replicated database. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
4261d6e70a
commit
5dcc1d7a69
@ -3188,7 +3188,17 @@ void ctdb_takeover_client_destructor_hook(struct ctdb_client *client)
|
||||
continue;
|
||||
}
|
||||
|
||||
ctdb_remove_connection(vnn, conn);
|
||||
/* If the IP address is hosted on this node then
|
||||
* remove the connection. */
|
||||
if (vnn->pnn == client->ctdb->pnn) {
|
||||
ctdb_remove_connection(vnn, conn);
|
||||
}
|
||||
|
||||
/* Otherwise this function has been called because the
|
||||
* server IP address has been released to another node
|
||||
* and the client has exited. This means that we
|
||||
* should not delete the connection information. The
|
||||
* takeover node processes connections too. */
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user