minikube
minikube copied to clipboard
Fix minikube image load on windows (#20529)
fixes #20529
getWindowsVolumeNameCmd uses the deprecated wmic.exe, this breaks minikube image load on newer installs of windows. Whilst wmic.exe can be added, it will be removed from Windows 11 soon.
See here for details.
This fix replaces the use of wmic.exe with a call to the Powershell equivalent.
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: james-world / name: James World (e17b3f4c84a0902de7d396d48a7b6e780d0674ca)
Welcome @james-world!
It looks like this is your first PR to kubernetes/minikube 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes/minikube has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
Hi @james-world. Thanks for your PR.
I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
Can one of the admins verify this patch?
If powershell.exe is not available in PATH (it should be...) it can be discovered via SystemRoot env variable:
'%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
OK, sorry for the hiatus - been busy at work. @medyagh I've removed the fallback as discussed and added code to robustly discover Powershell.exe, using the cited approaches.
thank you @james-world, let me ask @bobsira for last approve and then we can merge it @bobsira can you plz test this on windows and see if it fixes the issue?
@james-world plz see last comments and then we can merge this
@medyagh Added the requested comment.
thank you @james-world
/ok-to-test
kvm2 driver with docker runtime
┌────────────────┬──────────┬────────────────────────┐
│ COMMAND │ MINIKUBE │ MINIKUBE ( PR 20921 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 49.5s │ 50.5s │
│ enable ingress │ 15.0s │ 15.3s │
└────────────────┴──────────┴────────────────────────┘
Times for minikube start: 49.2s 50.9s 48.2s 48.4s 50.8s Times for minikube (PR 20921) start: 49.3s 48.8s 49.4s 52.7s 52.3s
Times for minikube ingress: 15.0s 15.0s 15.0s 14.9s 14.9s Times for minikube (PR 20921) ingress: 15.1s 15.0s 15.5s 15.9s 15.0s
docker driver with docker runtime
┌────────────────┬──────────┬────────────────────────┐
│ COMMAND │ MINIKUBE │ MINIKUBE ( PR 20921 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 23.9s │ 23.2s │
│ enable ingress │ 12.3s │ 12.5s │
└────────────────┴──────────┴────────────────────────┘
Times for minikube start: 25.2s 22.3s 21.8s 26.9s 23.1s Times for minikube (PR 20921) start: 23.0s 24.3s 25.2s 21.4s 22.2s
Times for minikube ingress: 10.7s 12.7s 12.7s 12.7s 12.7s Times for minikube (PR 20921) ingress: 12.2s 12.7s 11.2s 13.8s 12.7s
docker driver with containerd runtime
┌────────────────┬──────────┬────────────────────────┐
│ COMMAND │ MINIKUBE │ MINIKUBE ( PR 20921 ) │
├────────────────┼──────────┼────────────────────────┤
│ minikube start │ 23.4s │ 22.4s │
│ enable ingress │ 29.2s │ 24.4s │
└────────────────┴──────────┴────────────────────────┘
Times for minikube start: 24.1s 24.1s 23.5s 21.0s 24.1s Times for minikube (PR 20921) start: 20.6s 25.2s 21.2s 22.9s 22.2s
Times for minikube ingress: 22.7s 38.8s 38.7s 23.3s 22.7s Times for minikube (PR 20921) ingress: 22.7s 22.7s 22.7s 31.2s 22.7s
The failures seem unrelated to this PR (failed to pull an image)
@medyagh I've started to see this kind of error at work; it's docker.io rate-limiting. Definitely nothing to do with this PR.
The rate limiting on anonymous logins is by IP - see here. That means if you are using any shared IP on the build agent pool you can hit limits faster than you might think.
We've addressed it by using pull-through caches (we use ACR for this: https://learn.microsoft.com/en-us/azure/container-registry/artifact-cache-overview)
Guess minikube would need to cut a deal with docker.io, or do something similar.
@medyagh Just following up on this - not sure what else I can do? I'm pretty sure the build failure here is an unrelated transient issue with throttled image pulls from docker registry. Anything I can do to help move it along?
@medyagh I've started to see this kind of error at work; it's docker.io rate-limiting. Definitely nothing to do with this PR.
The rate limiting on anonymous logins is by IP - see here. That means if you are using any shared IP on the build agent pool you can hit limits faster than you might think.
We've addressed it by using pull-through caches (we use ACR for this: https://learn.microsoft.com/en-us/azure/container-registry/artifact-cache-overview)
Guess minikube would need to cut a deal with docker.io, or do something similar.
thank you for sharing that I will check that out. we have two different rate limit issue, on the host we login, but inside minikube, minikube itself pull images for addons and things like that that causes rate limit. one option would be login to docker inside minikube as well
I will checkout the caching you have linked
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: james-world, medyagh
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [medyagh]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
thank you very much @james-world for your patience and presistance and making minikube better for our windows users, I look forward to see more contributions from you, maybe you could join one of our Office Hours or Triage Parties https://minikube.sigs.k8s.io/community/