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 v1.22.0 cannot load E:\image tar.gz #11992

Closed
sunbinzhu opened this issue Jul 16, 2021 · 7 comments · Fixed by #12143
Closed

Minikube v1.22.0 cannot load E:\image tar.gz #11992

sunbinzhu opened this issue Jul 16, 2021 · 7 comments · Fixed by #12143
Assignees
Labels
area/image Issues/PRs related to the minikube image subcommand kind/regression Categorizes issue or PR as related to a regression from a prior release. os/windows priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@sunbinzhu
Copy link

I used to run the following command to load an image archive file into Minikube. It worked pretty well in V1.20.0. But when i upgraded to V1.22.0, it didn't work anymore, there was no error message, but when i ran "minikube image list", the image didn't show up. I also tried v1.21.0, it didn't work either.

minikube image load e:\myimage.tar.gz
minikube image list

@spowelljr spowelljr added the kind/support Categorizes issue or PR as a support question. label Jul 16, 2021
@sunbinzhu
Copy link
Author

Any update on this issue? Or do you need any more information?

@sharifelgamal
Copy link
Collaborator

sharifelgamal commented Aug 4, 2021

This definitely seems like a bug in our minikube image subcommand. What driver and container runtime are you using?

cc @afbjorklund

@sharifelgamal sharifelgamal added kind/bug Categorizes issue or PR as related to a bug. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. area/image Issues/PRs related to the minikube image subcommand and removed kind/support Categorizes issue or PR as a support question. labels Aug 4, 2021
@afbjorklund
Copy link
Collaborator

Pretty sure that E:\ DOS path could have something to do with it... Can you try with a cd, and then without the drive letter ?

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 4, 2021

Sadly the image load command doesn't show any output to the console, so all the information would be in the minikube log

minikube --alsologtostderr image load myimage.tar.gz

@sunbinzhu
Copy link
Author

Pretty sure that E:\ DOS path could have something to do with it... Can you try with a cd, and then without the drive letter ?

Thanks @afbjorklund, just tried, you are right, if i cd into the folder and then load the image with file name (but not the full file path), it worked, so we got a workaround for this issue. But as i mentioned, loading with the full file path used to work in v1.20, and broke in v1.21. Since the root cause is clear, could you guys help to fix? Thanks

And below is the output with the full file path:
minikube --alsologtostderr image load e:\temp\test.tar.gz
I0805 14:09:15.448641 4656 out.go:286] Setting OutFile to fd 84 ...
I0805 14:09:15.482116 4656 out.go:333] TERM=,COLORTERM=, which probably does not support color
I0805 14:09:15.483127 4656 out.go:299] Setting ErrFile to fd 88...
I0805 14:09:15.484124 4656 out.go:333] TERM=,COLORTERM=, which probably does not support color
I0805 14:09:15.537263 4656 cli_runner.go:115] Run: docker container inspect minikube --format={{.State.Status}}
I0805 14:09:16.796131 4656 cli_runner.go:168] Completed: docker container inspect minikube --format={{.State.Status}}: (1.258873s)
I0805 14:09:16.815164 4656 ssh_runner.go:149] Run: systemctl --version
I0805 14:09:16.828998 4656 cli_runner.go:115] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" minikube
I0805 14:09:17.272132 4656 sshutil.go:53] new ssh client: &{IP:127.0.0.1 Port:56625 SSHKeyPath:C:\Users\sunbinzhu.minikube\machines\minikube\id_rsa Username:docker}
I0805 14:09:17.376351 4656 docker.go:236] Removing image: e:\temp\test.tar.gz
I0805 14:09:17.391972 4656 ssh_runner.go:149] Run: docker rmi e:\temp\test.tar.gz
W0805 14:09:17.430959 4656 cache_images.go:244] Failed to load cached images for profile minikube. make sure the profile is running. loading images: removing image: remove image docker.: docker rmi e:\temp\test.tar.gz: Process exited with status 1
stdout:

stderr:
Error response from daemon: invalid reference format
I0805 14:09:17.431483 4656 cache_images.go:252] succeeded pushing to:
I0805 14:09:17.432525 4656 cache_images.go:253] failed pushing to: minikube

@afbjorklund afbjorklund changed the title Minikube v1.22.0 cannot load image tar.gz Minikube v1.22.0 cannot load E:\image tar.gz Aug 5, 2021
@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 5, 2021

Seems to be a bug introduced in 32a91d6

Removing image: e:\temp\test.tar.gz

It assumes that the filename is the same as the image name, which is only true in the cache - but fails when loading files.

Care to have a look, @spowelljr ?

@spowelljr spowelljr added kind/regression Categorizes issue or PR as related to a regression from a prior release. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed kind/bug Categorizes issue or PR as related to a bug. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. labels Aug 5, 2021
@spowelljr spowelljr added this to the 1.23.0 milestone Aug 5, 2021
@spowelljr spowelljr self-assigned this Aug 5, 2021
@spowelljr
Copy link
Member

@afbjorklund I created a PR that solves the issue, but if you have a better way in mind feel free to comment on it.

I'm going to add a test to catch this case tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/image Issues/PRs related to the minikube image subcommand kind/regression Categorizes issue or PR as related to a regression from a prior release. os/windows 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.

4 participants