File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -115,9 +115,12 @@ wait_for_docker()
115115 restart_count=$(( restart_count + 1 ))
116116 log " Docker service is ${svc_status} . Attempting restart ${restart_count} /${DOCKER_MAX_RESTARTS} ..."
117117 try_restart_docker
118+ sleep 2
118119 consecutive_failures=0
119120 elif [ " ${should_restart} " = true ] && [ " ${restart_count} " -ge " ${DOCKER_MAX_RESTARTS} " ]; then
120- log " Docker service is ${svc_status} but max restarts (${DOCKER_MAX_RESTARTS} ) exhausted"
121+ log " Docker service is ${svc_status} but max restarts (${DOCKER_MAX_RESTARTS} ) exhausted — giving up"
122+ log_diagnostics
123+ return 1
121124 fi
122125
123126 log " Docker not ready yet (${elapsed} s elapsed), retrying in ${DOCKER_READY_CHECK_INTERVAL_SECONDS} s..."
You can’t perform that action at this time.
0 commit comments