Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minikube image load not updating image if loading image with existing name:tag #11276

Closed
spowelljr opened this issue May 4, 2021 · 3 comments · Fixed by #11366
Closed

minikube image load not updating image if loading image with existing name:tag #11276

spowelljr opened this issue May 4, 2021 · 3 comments · Fixed by #11366
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@spowelljr
Copy link
Member

% minikube start

% docker build -t benchmark-image -f Dockerfile.large .

% docker images --all
REPOSITORY                                TAG        IMAGE ID       CREATED          SIZE
benchmark-image                           latest     e066761bca06   4 minutes ago    937MB

% minikube image load benchmark-image:latest

% eval $(./out/minikube docker-env) && docker image ls
REPOSITORY                                TAG        IMAGE ID       CREATED          SIZE
benchmark-image                           latest     e066761bca06   4 minutes ago    937MB

% docker build -t benchmark-image -f Dockerfile.small .

% docker images --all
REPOSITORY                                TAG        IMAGE ID       CREATED          SIZE
benchmark-image                           latest     60c0c9285193   2 minutes ago    721MB

% minikube image load benchmark-image:latest

% eval $(./out/minikube docker-env) && docker image ls
REPOSITORY                                TAG        IMAGE ID       CREATED          SIZE
benchmark-image                           latest     e066761bca06   4 minutes ago    937MB

As you can see above, pushing an image with the same name:tag does not update within minikube.

@spowelljr spowelljr added kind/bug Categorizes issue or PR as related to a bug. co/runtime/docker Issues specific to a docker runtime priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels May 4, 2021
@afbjorklund
Copy link
Collaborator

afbjorklund commented May 4, 2021

This is the same behaviour as the cache, we don't reload images that have the same name/tag.

#10060

@afbjorklund
Copy link
Collaborator

afbjorklund commented May 4, 2021

There are bunch of hard-coded checks for "preloaded" images and for scp of existing files

        // Skip loading images if images already exist
        if cr.ImagesPreloaded(images) {
                klog.Infof("Images are preloaded, skipping loading")
                return nil
        }
        // For tiny files, it's cheaper to overwrite than check
        if f.GetLength() > 4096 {
                exists, err := fileExists(k, f, dst)
                if err != nil {
                        klog.Infof("existence error for %s: %v", dst, err)
                }
                if exists {
                        klog.Infof("copy: skipping %s (exists)", dst)
                        return nil
                }
        }

These could possibly be regarded as features, but should be optional (like imagePullPolicy)

@spowelljr spowelljr added this to the v1.21.0 milestone May 7, 2021
@spowelljr spowelljr self-assigned this May 7, 2021
@spowelljr
Copy link
Member Author

In-progress

@afbjorklund afbjorklund changed the title minikube image load not updating image if loading image with existing name:tag on Mac using Docker minikube image load not updating image if loading image with existing name:tag May 9, 2021
@afbjorklund afbjorklund removed the co/runtime/docker Issues specific to a docker runtime label May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants