Skip to content
This repository has been 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

Conversation

CecileRobertMichon
Copy link
Contributor

What this PR does / why we need it: add a retry to systemctl restart docker command to guard against stuck command

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

Release note:

@@ -202,6 +202,8 @@ function ensureFilepath() {
fi
}

function retrycmd_if_failure() { retries=$1; wait=$2; shift && shift; for i in $(seq 1 $retries); do ${@}; [ $? -eq 0 ] && break || sleep $wait; done; echo Executed \"$@\" $i times; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI it must be this line that is breaking things, should we revert to the bash-compatible version and retry?

@CecileRobertMichon CecileRobertMichon changed the title add retry to restart docker add timeout to restart docker Mar 14, 2018
Copy link
Member

@jackfrancis jackfrancis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jackfrancis jackfrancis merged commit e22b3fc into Azure:master Mar 19, 2018
@ghost ghost removed the in progress label Mar 19, 2018
@CecileRobertMichon CecileRobertMichon deleted the retry-restart-docker branch April 16, 2018 17:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants