LCP IP allocation algorithm - new function lcp2_failback_candidate()
authorMartin Schwenke <martin@meltin.net>
Tue, 1 Nov 2011 08:49:38 +0000 (19:49 +1100)
committerMartin Schwenke <martin@meltin.net>
Tue, 1 Nov 2011 10:01:25 +0000 (21:01 +1100)
commit75718c5768b5bb5c0bcd7dd90e0327c6ed22a63d
treedc2b51057c2bdaeb47aa063c0a428817f634deb2
parent6dbbc86f36a1fd07d90ca947a35ad7b1f8554636
LCP IP allocation algorithm - new function lcp2_failback_candidate()

There's a bug in LCP2.  Selecting the node with the highest imbalance
doesn't always work.  Some nodes can have a high imbalance metric
because they have a lot of IPs.  However, these nodes can be part of a
group that is perfectly balanced.  Nodes in another group with less
IPs might actually be imbalanced.

Factor out the code from lcp2_failback() that actually takes a node
and decides which address should be moved to which node.

This is the first step in fixing the above bug.

Signed-off-by: Martin Schwenke <martin@meltin.net>
server/ctdb_takeover.c