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
# delips is complete.
try_command_on_node $test_node $CTDB sync
-# This effectively cancels any monitor event that is in progress and
-# runs a new one
-try_command_on_node $test_node $CTDB eventscript monitor
+# Wait for a monitor event. Then the next steps are unlikely to occur
+# in the middle of a monitor event and will have the expected effect.
+wait_for_monitor_event $test_node
if [ -z "$TEST_LOCAL_DAEMONS" ] ; then
# Stop monitor events from bringing up the link status of an interface