summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2019-10-29 15:11:31 +1100
committerAmitay Isaacs <amitay@samba.org>2019-11-06 01:22:30 +0000
commit3b5ed00054e7d1e34cf33706c670e17a188c67d1 (patch)
tree73d0ae4b093ce49d219ffc6da43f1807039a1a41 /ctdb
parentbf47bc18bb8a94231870ef821c0352b7a15c2e28 (diff)
downloadsamba-3b5ed00054e7d1e34cf33706c670e17a188c67d1.tar.gz
ctdb-tests: No longer retry starting the cluster
Retrying like this hides bugs. The cluster should come up first time, every time. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/tests/scripts/integration.bash34
1 files changed, 4 insertions, 30 deletions
diff --git a/ctdb/tests/scripts/integration.bash b/ctdb/tests/scripts/integration.bash
index d5bd542ab00..e36af5f9d51 100644
--- a/ctdb/tests/scripts/integration.bash
+++ b/ctdb/tests/scripts/integration.bash
@@ -568,26 +568,15 @@ wait_until_node_has_no_ips ()
ctdb_init ()
{
- local i
- for i in $(seq 1 5) ; do
ctdb_stop_all >/dev/null 2>&1 || :
- ctdb_start_all || {
- echo "Start failed. Trying again in a few seconds..."
- sleep_for 5
- continue
- }
- wait_until_ready || {
- echo "Cluster didn't become ready. Restarting..."
- continue
- }
+ ctdb_start_all || ctdb_test_error "Cluster start failed"
+
+ wait_until_ready || ctdb_test_error "Cluster didn't become ready"
echo "Setting RerecoveryTimeout to 1"
onnode -pq all "$CTDB setvar RerecoveryTimeout 1"
- # In recent versions of CTDB, forcing a recovery like this
- # blocks until the recovery is complete. Hopefully this will
- # help the cluster to stabilise before a subsequent test.
echo "Forcing a recovery..."
onnode -q 0 $CTDB recover
sleep_for 2
@@ -597,14 +586,8 @@ ctdb_init ()
wait_until 30/2 onnode -q any $CTDB_TEST_WRAPPER _cluster_is_recovered
fi
-
- # Cluster is still healthy. Good, we're done!
if ! onnode 0 $CTDB_TEST_WRAPPER _cluster_is_healthy ; then
- echo "Cluster became UNHEALTHY again [$(date)]"
- onnode -p all ctdb status -X 2>&1
- onnode -p all ctdb scriptstatus 2>&1
- echo "Restarting..."
- continue
+ ctdb_test_error "Cluster became UNHEALTHY again [$(date)]"
fi
echo "Doing a sync..."
@@ -612,15 +595,6 @@ ctdb_init ()
echo "ctdb is ready"
return 0
- done
-
- echo "Cluster UNHEALTHY... too many attempts..."
- onnode -p all ctdb status -X 2>&1
- onnode -p all ctdb scriptstatus 2>&1
-
- # Try to make the calling test fail
- status=1
- return 1
}
ctdb_base_show ()