IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
This makes IPv4 addresses comparable with IPv6 but reduces the overall
effectiveness of the algorithm. The alternative would be to treat
these addresses separately while trying to keep all the IPs in overall
balance... which is basically the problem that LCP2 solves. :-)
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 3a7624f9d468b99714a7b6a45313f9e7f66011ed)
This time in the stats summary.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit aabb2507dacc63ae026e6c99704a2fb79950e82c)
When there are IP groups, do not terminate when the overall cluster
goes out of balance.
Also make explicit that grat_ip_moves is an integer not a boolean, so
only terminate if it is greater than 0.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 0899f14b1483682d73d1ee2d2419db54ffeadc4b)
It had out-of-date information and a typo.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 5d0d2b8b528414c859da0e6fd5959321db33608b)
This is likely to cause many more state changes for nodes. In this
mode the odds of a failover are applied to determine whether a state
change occurs for each node. If no state change occurs then the
process is repeated.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit b7c42bff9457ec8294b04245af8e3b6010707d1a)
Print the LCP imbalance metric after the list of IPs.
To make this more sensible, but most of the printing logic into the
Node class.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 2e680e6b421d72cf2d217d3c3c1564da0bb19633)
The public addresses passed to the node constructer can be nested 2
levels. Each sub-list is an IP group for which separate balance
analysis is done. However, the public address list is flattened and
the actual IP assignment algorithm doesn't know about IP groups.
This allows extra statistics to be printed and an extra termination
condition to be added for unbalanced IP groups.
Most code from calculate_imbalance() is factored out to a a new
function imbalance_for_ips(), which calculates imbalance for the given
IPs. calculate_imbalance() now returns the overall imbalance and a
list containing imbalances for each IP group. To support this
node_ip_coverage() now takes an optional list of IPs to check coverage
within.
This also adds extra output to show statistics for the LCP2 imbalance
metric.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 701395087156b2a5c7be1564897b796df35b69ec)
An imbalance exceeding the hard limit, as specified by -H (and
defaulting to 1), now causes termination when -x is specified.
Imbalances exceeding the soft limit, as specified by -S (and
defaulting to 1), are counted and printed in the statistics summary.
A side-effect is that imbalances less than 2 are no longer rounded
down to 0, since we want to see them in the stats.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit b5e9a4c50eedb8cc786c52af06352788ca25f51e)
Add -L/--lcp2 option and implement LCP2 algorithm as an alternative to
the basic non-deterministic algorithm.
Existing examples will break if used with LCP2 since it needs real IP
addresses.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 22b14e1a887f0479cc75ed9027af5cc24797f217)
The hacks were attempts at improving the deterministic IPs algorithm
but they didn't work.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6034de0e24438e012f9f1d2065531b1ce467ac52)
-v can now be provided more than once to increase verbosity.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ce4fb56c9972a854bd139429b6f4a26e8d5c3956)
Group options better and make the language consistent between options.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bc38c17e4115fae00c89d00537fdcfe621111b37)
This can imply something about imbalance.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit ecb80e2b6be9326708d1fc87ad3028c6836d5858)
Tweak the usage message for -g option.
Print an error if no node groups defined, instead of curious Python
error.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 8b883eb9346b8278d268e35b56ac680cd9526b97)
This allows node pool configuration to be specifed on the
command-line.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit d382d9023928f75f360a115ae1e9c1036423416e)
The current code makes random choices from unsorted lists. This
ensures the lists are sorted.
Also, make the code easier to read by doing the random selction from
lists of PNNs rather than lists of Node objects.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a01244499dc3567f5aa934b1864b9bc183a6c242)
process_args() must now be called by programs inporting this module.
Options are put into global variable "options", which can be
references using "ctdb_takeover.options".
Can now pass extra option specifications to process_args().
Remove global variable prev and make it a Cluster object variable.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a32298e7bc819694518e859f100f9444ff5663cd)
There's a lot of new code here, so let's make the copyright message
make sense.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit e6e56e5989def6704b116e806c1f261c7f3fc03f)
We don't need to see warnings about unallocatable IPs unless we're in
verbose mode. Can node be run with -n (and without -v or -d) to see
just the statistics.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 55370936ac5def5ebf138910388a2ddc2df9c20f)
This is useful to know. When things get unbalance they tend to stay
that way.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a40faa2096effc2657ac05b729f3259bbb2e1fed)
This starts at -1 because we always have to do the initial allocation.
No longer print event number for each event by default, only when
verbose is enabled.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit c9a761726d141bcaa8ba7851150f71a8130b473a)
Implement the imbalance calculations.
Also add command-line option to display imbalance for each step.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit f50a12f6d06ed67efadd2a892d62c01e67310e7d)
Includes simulation module and example scenarios. This allows you to
test and perhaps tweak an algorithm that should be the same as the
current CTDB IP reallocation one.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 10e701fa9bba2a166c947a5a18f231ff64d9b861)