ctdb-ipalloc: Don't consider runstates in the IP takeover code
authorMartin Schwenke <martin@meltin.net>
Wed, 28 Oct 2015 11:15:00 +0000 (22:15 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 16 Nov 2015 07:42:11 +0000 (08:42 +0100)
commitbda2d9de2b188a3f3804ed198e9b59ffec5ef066
treec64455673681a2900ecb8693919ad441884e1814
parent9ea318847a3ec2a18ce897833b8a5fcf6d8c4205
ctdb-ipalloc: Don't consider runstates in the IP takeover code

Checking runstates is unnecessary now that nodes that are not RUNNING
will return no available IP addresses.  I have no idea why I didn't do
it this way originally.

Tweak the test code to cope with this.

Note that this is a backward-incompatible change.  If new and old
versions of CTDB are running together in a cluster and a new node
takes over as recovery master then old nodes will be able to host
public IP addresses before they are in RUNNING runstate.  This is
mitigated by the bias towards recovery master stability in elections.
If it is important that nodes do not host IPs until they are RUNNING
then do not restart nodes running the old version.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_takeover.c
ctdb/tests/src/ctdb_takeover_tests.c