1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

8 Commits

Author SHA1 Message Date
Martin Schwenke
eac5edf322 Testing: IP allocation simulation - Tweak options handling and Cluster.diff().
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)
2010-08-02 14:20:12 +10:00
Martin Schwenke
ef77f613fa Testing: IP allocation simulation - update copyright message.
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)
2010-08-02 14:16:02 +10:00
Martin Schwenke
de4223fa54 Testing: IP allocation simulation - add command line option for random seed.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 8362029c7cfc1041e46ee2116aa5cade6edce435)
2010-08-01 11:53:28 +10:00
Martin Schwenke
2e570851d5 Testing: IP allocation simulation - save some warnings for verbose mode.
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)
2010-08-01 11:41:52 +10:00
Martin Schwenke
d7d2c64834 Testing: IP allocation simulation prints final imbalance in statistics.
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)
2010-08-01 11:41:02 +10:00
Martin Schwenke
d7e996915c Testing: In IP allocation simulation count total number of events.
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)
2010-08-01 11:39:30 +10:00
Martin Schwenke
88337cb080 Testing: Add imbalance information to IP allocation simulation.
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)
2010-08-01 11:37:35 +10:00
Martin Schwenke
7c939e5fbf Testing: Add Python IP allocation simulation.
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)
2010-07-30 16:45:36 +10:00