Skip to content

Commit

Permalink
Merge pull request kubernetes#23824 from derekwaynecarr/automated-che…
Browse files Browse the repository at this point in the history
…rry-pick-of-#23746-upstream-release-1.2

Automated cherry pick of kubernetes#23746 upstream release 1.2
  • Loading branch information
zmerlynn committed Apr 6, 2016
2 parents d1b9882 + da870e9 commit 27d382d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/kubelet/container/image_puller.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (puller *imagePuller) PullImage(pod *api.Pod, container *api.Container, pul
puller.logIt(ref, api.EventTypeWarning, "Failed", logPrefix, fmt.Sprintf("Failed to pull image %q: %v", container.Image, err), glog.Warning)
puller.backOff.Next(backOffKey, puller.backOff.Clock.Now())
if err == RegistryUnavailable {
msg := fmt.Sprintf("image pull failed for %s because the registry is temporarily unavailable.", container.Image)
msg := fmt.Sprintf("image pull failed for %s because the registry is unavailable.", container.Image)
return err, msg
} else {
return ErrImagePull, err.Error()
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubelet/container/serialized_image_puller.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (puller *serializedImagePuller) PullImage(pod *api.Pod, container *api.Cont
puller.logIt(ref, api.EventTypeWarning, FailedToPullImage, logPrefix, fmt.Sprintf("Failed to pull image %q: %v", container.Image, err), glog.Warning)
puller.backOff.Next(backOffKey, puller.backOff.Clock.Now())
if err == RegistryUnavailable {
msg := fmt.Sprintf("image pull failed for %s because the registry is temporarily unavailable.", container.Image)
msg := fmt.Sprintf("image pull failed for %s because the registry is unavailable.", container.Image)
return err, msg
} else {
return ErrImagePull, err.Error()
Expand Down
3 changes: 2 additions & 1 deletion pkg/kubelet/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -3383,7 +3383,8 @@ func (kl *Kubelet) convertStatusToAPIStatus(pod *api.Pod, podStatus *kubecontain
} else if reason == kubecontainer.ErrImagePullBackOff ||
reason == kubecontainer.ErrImageInspect ||
reason == kubecontainer.ErrImagePull ||
reason == kubecontainer.ErrImageNeverPull {
reason == kubecontainer.ErrImageNeverPull ||
reason == kubecontainer.RegistryUnavailable {
// mark it as waiting, reason will be filled bellow
containerStatus.State = api.ContainerState{Waiting: &api.ContainerStateWaiting{}}
} else if reason == kubecontainer.ErrRunContainer {
Expand Down

0 comments on commit 27d382d

Please sign in to comment.