ctdb-takeover: Drop unused ctdb_takeover_run() and related code
[kamenim/samba-autobuild/.git] / ctdb / tests / takeover / simulation / ip_groups3.py
1 #!/usr/bin/env python
2
3 # 4 IP groups, across 10 nodes, with each group on different
4 # interfaces/VLANs.  80 addresses in total but not evenly balanced, to
5 # help check some of the more extreme behaviour.
6
7 from ctdb_takeover import Cluster, Node, process_args
8
9 process_args()
10
11 addresses1 = ['192.168.1.%d' % n for n in range(1, 41)]
12 addresses2 = ['192.168.2.%d' % n for n in range(1, 21)]
13 addresses3 = ['192.168.3.%d' % n for n in range(1, 11)]
14 addresses4 = ['192.168.4.%d' % n for n in range(1, 11)]
15
16 # Try detecting imbalance with square root of number of nodes?  Or
17 # just with a parameter indicating how unbalanced you're willing to
18 # accept...
19
20 c = Cluster()
21
22 for i in range(10):
23     c.add_node(Node([addresses1, addresses2, addresses3, addresses4]))
24
25 c.recover()
26
27 c.random_iterations()