ctdbd: Release IP callback should fail if the IP is still hosted
commit26b161156a5c14dc427ceca6020f49994ca22843
authorMartin Schwenke <martin@meltin.net>
Mon, 24 Jun 2013 06:05:03 +0000 (24 16:05 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Fri, 5 Jul 2013 05:52:32 +0000 (5 15:52 +1000)
treee9088b1586a669dbbbb07d7e87b61ca7f45cea36
parent793233f6b678c9d86261332942c9a4876f4d1d61
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)
ctdb/server/ctdb_takeover.c