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)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 14 Feb 2012 01:17:42 +0000 (12:17 +1100)
commitd9579c2971659f1ebc218a339d28f15132dd5718
treed4929e4e034f42a78fa4d7ad8a02d3ee5d30a253
parent0a626cef2547bbd3ea5c80da5ee2fb65691e0d88
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