Test suite - fix addip test.
authorMartin Schwenke <martin@meltin.net>
Wed, 4 Aug 2010 06:08:12 +0000 (16:08 +1000)
committerMartin Schwenke <martin@meltin.net>
Wed, 4 Aug 2010 06:08:12 +0000 (16:08 +1000)
The test currently checks that all existing IPs plus the newly added
IP are on the test node after "ctdb addip" is run.  With
DeterministicIPs enabled, if the new IP is "before" other IPs then the
other IPs may be shuffled by the deterministic IPs modulo algorithm.
This will happen on the 1st recovery after the move.  Sometimes this
recovery happens before we get the list of IPs to check and sometimes
after, so the test is racy.

The fix is to simply check for the presence of the new IP and not
worry about the others.  This reduces whatever value this test
had... but you can't have everything.

Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/simple/16_ctdb_config_add_ip.sh

index 5505e9938798d61ac753f4cd207d0a901a3a937a..6fee386d084b333dc738ccd17c354e17203f52f3 100755 (executable)
@@ -111,7 +111,7 @@ echo "Adding IP: ${add_ip/:/ on interface }"
 try_command_on_node $test_node $CTDB addip ${add_ip/:/ }
 
 echo "Waiting for IP to be added..."
-if wait_until 60 ips_are_on_nodeglob $test_node $test_node_ips ${add_ip%/*} ; then
+if wait_until 60 ips_are_on_nodeglob $test_node ${add_ip%/*} ; then
     echo "That worked!"
 else
     echo "BAD: IP didn't get added."