From: Martin Schwenke Date: Mon, 17 Feb 2020 05:29:05 +0000 (+1100) Subject: ctdb-tests: Avoid shutdown error when daemon already cleanly shut down X-Git-Tag: ldb-2.1.1~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=03403aacfe9664bf4cb5689ae40ac1688984d6c6;p=thirdparty%2Fsamba.git ctdb-tests: Avoid shutdown error when daemon already cleanly shut down This depends on a small amount of internal knowledge but is the cleanest way of avoiding errors for nodes that have already been shut down. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/local_daemons.sh b/ctdb/tests/local_daemons.sh index e9f9423cb0c..a67055a9337 100755 --- a/ctdb/tests/local_daemons.sh +++ b/ctdb/tests/local_daemons.sh @@ -367,7 +367,10 @@ local_daemons_stop () onnode_common - onnode -p "$_nodes" "${CTDB:-${VALGRIND:-} ctdb} shutdown" + onnode -p "$_nodes" \ + "if [ -e \"\${CTDB_BASE}/run/ctdbd.pid\" ] ; then \ + ${CTDB:-${VALGRIND:-} ctdb} shutdown ; \ + fi" } local_daemons_onnode_usage ()