ctdbd: Fix ctdb_control_release_ip() on local daemons
authorMartin Schwenke <martin@meltin.net>
Mon, 2 Jul 2012 04:09:32 +0000 (14:09 +1000)
committerMichael Adam <obnox@samba.org>
Fri, 6 Jun 2014 13:00:39 +0000 (15:00 +0200)
commit02b1af9cd062a1fc82da906aa398822fa973cf86
treedce8614ed94f08606aa11ab03bffc3774dd8d157
parentc5a953f762d4d8955d83dc8c6e0cdcb1c91a2abd
ctdbd: Fix ctdb_control_release_ip() on local daemons

When running on local daemons no IPs are actually assigned to
interfaces.  Commit 9a806dec8687e2ec08a308853b61af6aed5e5d1e broke
ctdb_control_release_ip() for local daemons because it asks the system
which interface the given IP is on, instead of the old behaviour of
trusting CTDB's internal records.

For local deamons (i.e. !ctdb->do_checkpublicip) revert to the old
behaviour of looking up the interface internally.  This is good
enough, given that the tests don't tend to misconfigure the addresses.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit 38e8651b955afdbaf0ae87c24c55c052f8209290)
server/ctdb_takeover.c