ctdbd: Make the link status of new interfaces more flexible
authorMartin Schwenke <martin@meltin.net>
Fri, 16 Nov 2012 08:43:14 +0000 (19:43 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Mon, 19 Nov 2012 04:53:13 +0000 (15:53 +1100)
commit0f1bcebc80330b6bb1ab4229ede6f0d3ab614709
tree3c8b2d290411b4c2f295f401b999f0778df5b7e2
parent442d9905fea465b8257fa5bdc666eedb4302b121
ctdbd: Make the link status of new interfaces more flexible

Neither up nor down is a good default value for the link status of a
new interface.  Up means that IPs can be assigned to interfaces before
the true state is known and they can move away quickly if the interface
is actually down.  Down means that IPs can't be assigned to an interface
for a variable amount of time - until a monitor cycle occurs - and this
can result in imbalanced IPs.

This is a neat compromise.  Before the startup event completes, IPs
can't be assigned to interfaces because all interfaces begin in a down
state.  As soon as the startup event completes, IPs can be allocated
to any interface that has been marked up by the eventscript.  Later,
during normal operation, newly added IPs can be assigned to new
interfaces immediately.  The IPs will still move away if an interface
is noticed to be down in the next monitor cycle, but that is the
exception rather than the rule.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 9275a69a414482f1053ae14528d5972575b9214e)
ctdb/server/ctdb_takeover.c