Fix jepsen nodes not starting up healthy (#1846)

* add a loop to check if all nodes started correctly and restart if any failed
This commit is contained in:
Marko Barišić 2024-03-21 18:39:40 +01:00 committed by GitHub
parent 56be736d30
commit 89e13109d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -178,8 +178,16 @@ PROCESS_RESULTS() {
CLUSTER_UP() {
PRINT_CONTEXT
"$script_dir/jepsen/docker/bin/up" --daemon
sleep 10
local cnt=0
while [[ "$cnt" < 5 ]]; do
if ! "$script_dir/jepsen/docker/bin/up" --daemon; then
cnt=$((cnt + 1))
continue
else
sleep 10
break
fi
done
# Ensure all SSH connections between Jepsen containers work
for node in $(docker ps --filter name=jepsen* --filter status=running --format "{{.Names}}"); do
if [ "$node" == "jepsen-control" ]; then