Skip to content

Commit

Permalink
Merge pull request #11690 from andriyDev/fix-redownload-kicbase
Browse files Browse the repository at this point in the history
Move daemon cache check before file cache check
  • Loading branch information
medyagh committed Jun 21, 2021
2 parents 4a8cf23 + 95333ed commit ab41aa5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions pkg/minikube/node/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ func beginDownloadKicBaseImage(g *errgroup.Group, cc *config.ClusterConfig, down
}()
for _, img := range append([]string{baseImg}, kic.FallbackImages...) {
var err error

if driver.IsDocker(cc.Driver) {
if download.ImageExistsInDaemon(img) {
klog.Infof("%s exists in daemon, skipping load", img)
finalImg = img
return nil
}
}

klog.Infof("Downloading %s to local cache", img)
err = download.ImageToCache(img)
if err == nil {
Expand All @@ -141,14 +150,6 @@ func beginDownloadKicBaseImage(g *errgroup.Group, cc *config.ClusterConfig, down
return err
}

if driver.IsDocker(cc.Driver) {
if download.ImageExistsInDaemon(img) {
klog.Infof("%s exists in daemon, skipping load", img)
finalImg = img
return nil
}
}

if cc.Driver == driver.Podman {
return fmt.Errorf("not yet implemented, see issue #8426")
}
Expand Down

0 comments on commit ab41aa5

Please sign in to comment.