1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00
samba-mirror/ctdb/tests/takeover/nondet_path_01.py
Martin Schwenke 0fdd7566c7 Testing: IP allocation simulation - update options processing in examples.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit a65ca1a71386f40080dd553756f3600d3b20d523)
2010-08-02 15:01:47 +10:00

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()