mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
0fdd7566c7
Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a65ca1a71386f40080dd553756f3600d3b20d523)
26 lines
461 B
Python
Executable File
26 lines
461 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
# This is a contrived example that makes the balancing algorithm fail
|
|
# for nondeterministic IPs (run with "-dv --nd" to see the failure).
|
|
|
|
from ctdb_takeover import Cluster, Node, process_args
|
|
|
|
process_args()
|
|
|
|
addresses1 = ['A', 'B', 'C', 'D']
|
|
addresses2 = ['B', 'E', 'F']
|
|
|
|
c = Cluster()
|
|
|
|
for i in range(2):
|
|
c.add_node(Node(addresses1))
|
|
|
|
c.add_node(Node(addresses2))
|
|
|
|
c.recover()
|
|
|
|
c.unhealthy(1)
|
|
c.recover()
|
|
c.healthy(1)
|
|
c.recover()
|