mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
ctdbd: Release IP callback should fail if the IP is still hosted
At the moment there (at least) are 2 bugs that cause rogue IPs: * A race where release_ip_callback() runs after a "subsequent" take IP has completed. The IP is back on an interface but we unset vnn->iface in the callback. * A "releaseip" eventscript times out. We ignore the timeout and call it success, deleting the VNN even if the IP is still hosted. We could decide not to ignore the timeout and ban the node, but killing TCP connections can take a long time and that might result in a lot of manning. We probably won't reinstate banning on "releaseip" until killing TCP connections has been optimised. In both cases, a rogue IP can be avoided by leaving vnn->iface set and simply failing the control. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit c5797f2942e83da24df548ea07196fbbac0eab20)
This commit is contained in:
parent
793233f6b6
commit
26b161156a
@ -881,6 +881,14 @@ static void release_ip_callback(struct ctdb_context *ctdb, int status,
|
||||
ctdb_ban_self(ctdb);
|
||||
}
|
||||
|
||||
if (ctdb->do_checkpublicip && ctdb_sys_have_ip(state->addr)) {
|
||||
DEBUG(DEBUG_ERR, ("IP %s still hosted during release IP callback, failing\n",
|
||||
ctdb_addr_to_str(state->addr)));
|
||||
ctdb_request_control_reply(ctdb, state->c, NULL, -1, NULL);
|
||||
talloc_free(state);
|
||||
return;
|
||||
}
|
||||
|
||||
/* send a message to all clients of this node telling them
|
||||
that the cluster has been reconfigured and they should
|
||||
release any sockets on this IP */
|
||||
|
Loading…
x
Reference in New Issue
Block a user