Merge pull request #65349 from hanxiaoshuai/fix0622

Automatic merge from submit-queue (batch tested with PRs 65349, 65354, 65402). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

check error when failed to prepull the images

**Special notes for your reviewer**:
return error when failed to prepull the images
**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-06-30 10:50:01 -07:00 committed by GitHub
commit d70b8f5062
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,7 +193,9 @@ func RunApply(flags *applyFlags) error {
// and block until all DaemonSets are ready; then we know for sure that all control plane images are cached locally
glog.V(1).Infof("[upgrade/apply] creating prepuller")
prepuller := upgrade.NewDaemonSetPrepuller(upgradeVars.client, upgradeVars.waiter, upgradeVars.cfg)
upgrade.PrepullImagesInParallel(prepuller, flags.imagePullTimeout)
if err := upgrade.PrepullImagesInParallel(prepuller, flags.imagePullTimeout); err != nil {
return fmt.Errorf("[upgrade/prepull] Failed prepulled the images for the control plane components error: %v", err)
}
// Now; perform the upgrade procedure
glog.V(1).Infof("[upgrade/apply] performing upgrade")