summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2014-02-12 15:33:19 +1100
committerAmitay Isaacs <amitay@samba.org>2014-02-13 04:05:57 +0100
commita9ccdec008ebcb1b286eede4f43167e3e4d4cbe0 (patch)
treec23cb0e7e8304f82f9c5122573512da52a0d36e8
parentf1a20d748f6ab4702be5b17047a3fbfa0f3e8d0c (diff)
downloadsamba-a9ccdec008ebcb1b286eede4f43167e3e4d4cbe0.tar.gz
samba-a9ccdec008ebcb1b286eede4f43167e3e4d4cbe0.tar.xz
samba-a9ccdec008ebcb1b286eede4f43167e3e4d4cbe0.zip
ctdb-tests: Handle interactions with monitor events
In the first case, reconfiguration can longer happen in a monitor event, so this is no longer a problem. Drop it. Running a monitor event by hand no longer cancels the existing monitor event. Instead the hand-run event fails. So do this differently and just wait for a monitor event before continuing. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Thu Feb 13 04:05:57 CET 2014 on sn-devel-104
-rwxr-xr-xctdb/tests/simple/60_recoverd_missing_ip.sh10
1 files changed, 3 insertions, 7 deletions
diff --git a/ctdb/tests/simple/60_recoverd_missing_ip.sh b/ctdb/tests/simple/60_recoverd_missing_ip.sh
index 0734aeef8a..88e450227b 100755
--- a/ctdb/tests/simple/60_recoverd_missing_ip.sh
+++ b/ctdb/tests/simple/60_recoverd_missing_ip.sh
@@ -37,10 +37,6 @@ 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
@@ -61,9 +57,9 @@ ctdb_test_exit_hook_add my_exit_hook
# 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