tests/simple: Minimise the chance of a monitor event being cancelled
authorMartin Schwenke <martin@meltin.net>
Thu, 22 Aug 2013 04:04:59 +0000 (14:04 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Thu, 22 Aug 2013 07:00:20 +0000 (17:00 +1000)
A monitor event following a "ctdb delip" might reconfigure services.
If the monitor event is cancelled then a service might be stopped but
not yet restarted and this could result in the subsequent monitor
events failing.

This obviously needs to be fixed in CTDB itself.  This will happen by
making "ctdb reloadips" the supported way of reconfiguring IPs.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 618ea3660e36e7bd92b686e1ca8728cf63c3c068)

ctdb/tests/simple/60_recoverd_missing_ip.sh

index 43ec085feb74fe1486a8d3d07f5be64063e28eea..0734aeef8a1b02331172e412160f8d52487fe7a3 100755 (executable)
@@ -37,6 +37,10 @@ fi
 
 echo "$test_ip/$mask is on $iface"
 
+# Push out the next monitor event so it is less likely to be cancelled
+# and result in services not being restarted properly.
+try_command_on_node $test_node $CTDB eventscript monitor
+
 echo "Deleting IP $test_ip from all nodes"
 try_command_on_node -v $test_node $CTDB delip -n all $test_ip