From: Martin Schwenke Date: Mon, 8 Oct 2018 02:53:16 +0000 (+1100) Subject: ctdb-tests: Drop dependency on variable ctdb_test_restart_scheduled X-Git-Tag: tdb-1.3.17~882 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79db138de5f1d9c95edf436d828725fc68f2d104;p=thirdparty%2Fsamba.git ctdb-tests: Drop dependency on variable ctdb_test_restart_scheduled The remainder of the scheduled restart logic is about to be removed, so produce debugging information any time the cluster is not healthy. While here, reindent and drop the else since there is already an early return before it. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/scripts/integration.bash b/ctdb/tests/scripts/integration.bash index 4202829f2cc..f53dd76c909 100644 --- a/ctdb/tests/scripts/integration.bash +++ b/ctdb/tests/scripts/integration.bash @@ -288,24 +288,25 @@ _cluster_is_ready () cluster_is_healthy () { - if onnode 0 $CTDB_TEST_WRAPPER _cluster_is_healthy ; then - echo "Cluster is HEALTHY" - if ! onnode 0 $CTDB_TEST_WRAPPER _cluster_is_recovered ; then - echo "WARNING: cluster in recovery mode!" + if onnode 0 $CTDB_TEST_WRAPPER _cluster_is_healthy ; then + echo "Cluster is HEALTHY" + if ! onnode 0 $CTDB_TEST_WRAPPER _cluster_is_recovered ; then + echo "WARNING: cluster in recovery mode!" + fi + return 0 fi - return 0 - else + echo "Cluster is UNHEALTHY" - if ! ${ctdb_test_restart_scheduled:-false} ; then - echo "DEBUG AT $(date '+%F %T'):" - local i - for i in "onnode -q 0 $CTDB status" "onnode -q 0 onnode all $CTDB scriptstatus" ; do + + echo "DEBUG AT $(date '+%F %T'):" + local i + for i in "onnode -q 0 $CTDB status" \ + "onnode -q 0 onnode all $CTDB scriptstatus" ; do echo "$i" $i || true - done - fi + done + return 1 - fi } wait_until_ready ()