Skip to content

Commit

Permalink
Merge pull request #7003 from medyagh/preload_block
Browse files Browse the repository at this point in the history
block on preload download
  • Loading branch information
medyagh committed Mar 11, 2020
2 parents 74152a3 + f92edc3 commit 8b99647
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/minikube/node/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ import (
// beginCacheKubernetesImages caches images required for kubernetes version in the background
func beginCacheKubernetesImages(g *errgroup.Group, imageRepository string, k8sVersion, cRuntime string) {
if download.PreloadExists(k8sVersion, cRuntime) {
g.Go(func() error {
glog.Info("Caching tarball of preloaded images")
return download.Preload(k8sVersion, cRuntime)
})
return
glog.Info("Caching tarball of preloaded images")
err := download.Preload(k8sVersion, cRuntime)
if err == nil {
glog.Infof("Finished downloading the preloaded tar for %s on %s", k8sVersion, cRuntime)
return // don't cache individual images if preload is successful.
}
glog.Warningf("Error downloading preloaded artifacts will continue without preload: %v", err)
}

if !viper.GetBool("cache-images") {
Expand Down

0 comments on commit 8b99647

Please sign in to comment.