ctdb-tests: Do not use ctdbd_wrapper in local daemon tests
authorMartin Schwenke <martin@meltin.net>
Tue, 10 Jul 2018 05:57:19 +0000 (15:57 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 8 Oct 2018 00:46:22 +0000 (02:46 +0200)
Run the daemon directly and shut it down using ctdb shutdown.

The wrapper waits for ctdbd to reach >=FIRST_RECOVERY runstate within
a timeout period and shuts ctdbd down if that doesn't happen.  This is
only really used to ensure that ctdbd doesn't exit early after an
apparently successful start.  There are no known cases where ctdbd
will continue running but fail to reach >=FIRST_RECOVERY runstate.

When ctdbd is started in tests, the test code will wait until ctdbd is
in a healthy state on all nodes before proceeding, so there is
effectively no change in behaviour.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/simple/scripts/local_daemons.bash

index 6b13f3767aa7d8c1df92d463c257f6306dfd64b3..6adec79c2af7d719ed9ed606bfa00663403eed60 100644 (file)
@@ -1,9 +1,6 @@
 # If we're not running on a real cluster then we need a local copy of
 # ctdb (and other stuff) in $PATH and we will use local daemons.
 
-# For ctdbd_wrapper
-PATH="${CTDB_SCRIPTS_BASE}:${PATH}"
-
 hdir="$CTDB_SCRIPTS_HELPER_BINDIR"
 export CTDB_EVENTD="${hdir}/ctdb-eventd"
 export CTDB_EVENT_HELPER="${hdir}/ctdb-event"
@@ -166,8 +163,7 @@ start_ctdb_1 ()
 {
        local pnn="$1"
 
-       CTDBD="${VALGRIND} ctdbd" \
-            onnode "$pnn" ctdbd_wrapper start
+       onnode "$pnn" $VALGRIND ctdbd
 }
 
 ctdb_start_all ()
@@ -184,7 +180,7 @@ stop_ctdb_1 ()
 {
        local pnn="$1"
 
-       onnode "$pnn" ctdbd_wrapper stop
+       onnode "$pnn" $CTDB shutdown
 }
 
 ctdb_stop_all ()