summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2011-11-01 19:59:29 +1100
committerMartin Schwenke <martin@meltin.net>2011-11-01 21:01:25 +1100
commit575f76788b519a26a120b365bfde826555deaedc (patch)
treef7c51a39e4004984cf3cdb3415f63535ba00bd96
parentfa29fdf9baac8bc0fbe91c40f903480980f45828 (diff)
downloadsamba-575f76788b519a26a120b365bfde826555deaedc.tar.gz
samba-575f76788b519a26a120b365bfde826555deaedc.tar.xz
samba-575f76788b519a26a120b365bfde826555deaedc.zip
Tests - IP allocation - new test that shows current LCP2 failure
There are 4 IPs across 2 nodes and 2 addresses across 2 other nodes. If one of the latter nodes is unhealthy and then becomes healthy again, an IP isn't failed back. This is because the nodes in the 1st group are >= unbalanced then the nodes in the 2nd group. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 1d26e7cff6292fcbf63efc4628ffbb63b6f1f73c)
-rwxr-xr-xctdb/tests/takeover/testcases/lcp2.010.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/ctdb/tests/takeover/testcases/lcp2.010.sh b/ctdb/tests/takeover/testcases/lcp2.010.sh
new file mode 100755
index 0000000000..c47b6528cd
--- /dev/null
+++ b/ctdb/tests/takeover/testcases/lcp2.010.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+. "${TAKEOVER_TESTS_DIR}/common.sh"
+
+define_test "2 disjoint groups of nodes/addresses, a node becomes healthy"
+
+# This illustrates a bug in LCP2 when the the only candidate for a
+# source node is chosen to be the "most imbalanced" node. This means
+# that nodes in the smaller group aren't necessarily (depends on sort
+# order and addresses used) considered as candidates. If the larger
+# group has 6 addresses then the "necessarily" goes away and the
+# smaller group won't be rebalanced.
+
+export CTDB_TEST_LOGLEVEL=0
+
+required_result <<EOF
+192.168.209.102 3
+192.168.209.101 2
+192.168.140.4 1
+192.168.140.3 1
+192.168.140.2 0
+192.168.140.1 0
+EOF
+
+simple_test 0,0,0,0 <<EOF
+192.168.140.1 0 0,1
+192.168.140.2 0 0,1
+192.168.140.3 1 0,1
+192.168.140.4 1 0,1
+192.168.209.101 2 2,3
+192.168.209.102 2 2,3
+EOF