File: ip_groups5.py

package info (click to toggle)
ctdb 1.12%2Bgit20120201-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,656 kB
  • sloc: ansic: 61,736; sh: 18,367; xml: 3,887; python: 1,220; makefile: 554; perl: 319; awk: 118
file content (23 lines) | stat: -rwxr-xr-x 499 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python

# 1 IP group, to test backward compatibility of LCP2 algorithm.  16
# addresses across 4 nodes.

from ctdb_takeover import Cluster, Node, process_args

process_args()

addresses1 = ['192.168.1.%d' % n for n in range(1, 17)]

# Try detecting imbalance with square root of number of nodes?  Or
# just with a parameter indicating how unbalanced you're willing to
# accept...

c = Cluster()

for i in range(4):
    c.add_node(Node(addresses1))

c.recover()

c.random_iterations()