Commit 3b512add authored by jiangyaoguo's avatar jiangyaoguo

check image present after pulled image with no error

parent 5156b93a
...@@ -159,6 +159,14 @@ func (p dockerPuller) Pull(image string, secrets []api.Secret) error { ...@@ -159,6 +159,14 @@ func (p dockerPuller) Pull(image string, secrets []api.Secret) error {
err := p.client.PullImage(opts, docker.AuthConfiguration{}) err := p.client.PullImage(opts, docker.AuthConfiguration{})
if err == nil { if err == nil {
// Sometimes PullImage failed with no error returned.
exist, ierr := p.IsImagePresent(image)
if ierr != nil {
glog.Warningf("Failed to inspect image %s: %v", image, ierr)
}
if !exist {
return fmt.Errorf("image pull failed for unknown error")
}
return nil return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment