summaryrefslogtreecommitdiff
path: root/ctdb/tests/scripts/integration.bash
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2018-10-08 13:53:16 +1100
committerAmitay Isaacs <amitay@samba.org>2018-11-06 07:16:16 +0100
commit79db138de5f1d9c95edf436d828725fc68f2d104 (patch)
tree4afd6a6cf59bbdd1ac21645b204dca90f003c173 /ctdb/tests/scripts/integration.bash
parentbc8df7191c0e3acb9763aff7cb659bbb8292b950 (diff)
downloadsamba-79db138de5f1d9c95edf436d828725fc68f2d104.tar.gz
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 <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/tests/scripts/integration.bash')
-rw-r--r--ctdb/tests/scripts/integration.bash27
1 files changed, 14 insertions, 13 deletions
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 ()