mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #26825 from timstclair/node-e2e-pull
Automatic merge from submit-queue Fix node e2e image pulling retry logic
This commit is contained in:
commit
a2d79d0ef6
@ -63,11 +63,15 @@ func PrePullAllImages() error {
|
||||
err error
|
||||
output []byte
|
||||
)
|
||||
for i := maxImagePullRetries; i > 0; i++ {
|
||||
for i := 0; i < maxImagePullRetries; i++ {
|
||||
if i > 0 {
|
||||
time.Sleep(imagePullRetryDelay)
|
||||
}
|
||||
if output, err = exec.Command("docker", "pull", image).CombinedOutput(); err == nil {
|
||||
break
|
||||
}
|
||||
time.Sleep(imagePullRetryDelay)
|
||||
glog.Warningf("Failed to pull %s, retrying in %s (%d of %d): %v",
|
||||
image, imagePullRetryDelay.String(), i+1, maxImagePullRetries, err)
|
||||
}
|
||||
if err != nil {
|
||||
glog.Warningf("Could not pre-pull image %s %v output: %s", image, err, output)
|
||||
|
Loading…
Reference in New Issue
Block a user