Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

add timeout to restart docker #2457

Merged
merged 8 commits into from
Mar 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions parts/k8s/kubernetesmastercustomscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -487,12 +487,11 @@ function ensureDocker() {
systemctlEnableAndCheck docker
# only start if a reboot is not required
if ! $REBOOTREQUIRED; then
systemctl restart docker
dockerStarted=1
for i in {1..900}; do
if ! /usr/bin/docker info; then
echo "status $?"
/bin/systemctl restart docker
timeout 60s /bin/systemctl restart docker
else
echo "docker started, took $i seconds"
dockerStarted=0
Expand Down