-
Notifications
You must be signed in to change notification settings - Fork 5k
Fix minikube image load on windows (#20529) #20921
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
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: james-world The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @james-world! |
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 Once the patch is verified, the new status will be reflected by the 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? |
7a66934
to
211296e
Compare
If powershell.exe is not available in PATH (it should be...) it can be discovered via |
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this on Windows machine, works fine! Approved @medyagh
Had a successful run with the changes,
`C:\dev\minikube\out>minikube.exe image load nginx:latest --alsologtostderr I0714 02:30:21.918732 24816 out.go:345] Setting OutFile to fd 96 ... I0714 02:30:21.949424 24816 out.go:392] TERM=,COLORTERM=, which probably does not support color I0714 02:30:21.949424 24816 out.go:358] Setting ErrFile to fd 100... I0714 02:30:21.950091 24816 out.go:392] TERM=,COLORTERM=, which probably does not support color I0714 02:30:21.969639 24816 config.go:182] Loaded profile config "minikube": Driver=hyperv, ContainerRuntime=docker,
KubernetesVersion=v1.33.2
=== some of the logs removed to have this fit in the comment
I0714 02:30:36.438734 24816 cache_images.go:123] Successfully loaded all cached images I0714 02:30:36.438734 24816 cache_images.go:92] duration metric: took 5.9631078s to LoadCachedImages I0714 02:30:36.439366 24816 cache_images.go:262] succeeded pushing to: minikube `
@james-world plz see last comments and then we can merge this |
getWindowsVolumeNameCmd uses the deprecated wmic.exe. See https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmic for details. Replace the implementation with a call to the Powershell equivalent. Look in path and system environment vars to locate Powershell. Improve Powershell discovery
@medyagh Added the requested comment. |
thank you @james-world |
/ok-to-test |
kvm2 driver with docker runtime
Times for minikube start: 49.2s 50.9s 48.2s 48.4s 50.8s Times for minikube ingress: 15.0s 15.0s 15.0s 14.9s 14.9s docker driver with docker runtime
Times for minikube start: 25.2s 22.3s 21.8s 26.9s 23.1s Times for minikube ingress: 10.7s 12.7s 12.7s 12.7s 12.7s docker driver with containerd runtime
Times for minikube start: 24.1s 24.1s 23.5s 21.0s 24.1s Times for minikube ingress: 22.7s 38.8s 38.7s 23.3s 22.7s |
The failures seem unrelated to this PR (failed to pull an image) |
fixes #20529
getWindowsVolumeNameCmd
uses the deprecated wmic.exe, this breaksminikube 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.