From a9ac33015b64b7cf4f8d9e69576f8237a9b62684 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 10 Jul 2018 15:57:19 +1000 Subject: [PATCH] ctdb-tests: Do not use ctdbd_wrapper in local daemon tests 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 Reviewed-by: Amitay Isaacs --- ctdb/tests/simple/scripts/local_daemons.bash | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ctdb/tests/simple/scripts/local_daemons.bash b/ctdb/tests/simple/scripts/local_daemons.bash index 6b13f3767aa..6adec79c2af 100644 --- a/ctdb/tests/simple/scripts/local_daemons.bash +++ b/ctdb/tests/simple/scripts/local_daemons.bash @@ -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 ()