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:
parent
56be736d30
commit
89e13109d7
@ -178,8 +178,16 @@ PROCESS_RESULTS() {
|
|||||||
|
|
||||||
CLUSTER_UP() {
|
CLUSTER_UP() {
|
||||||
PRINT_CONTEXT
|
PRINT_CONTEXT
|
||||||
"$script_dir/jepsen/docker/bin/up" --daemon
|
local cnt=0
|
||||||
sleep 10
|
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
|
# Ensure all SSH connections between Jepsen containers work
|
||||||
for node in $(docker ps --filter name=jepsen* --filter status=running --format "{{.Names}}"); do
|
for node in $(docker ps --filter name=jepsen* --filter status=running --format "{{.Names}}"); do
|
||||||
if [ "$node" == "jepsen-control" ]; then
|
if [ "$node" == "jepsen-control" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user