-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
windows wsl2: Fix invoking kubeadm failing when spaces in PATH for none driver #12617
Conversation
Welcome @marwatk! |
Hi @marwatk. 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/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: marwatk 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 |
Can one of the admins verify this patch? |
@marwatk is this for None Driver ? do you mind echoing an example of full Env that breaks minikube ? |
/ok-to-test |
Yes, none driver.
Here you go (this is on actual Linux, not WSL2): # PATH="$PATH:with space" out/minikube start --driver=none
😄 minikube v1.23.2 on Rocky 8.4
✨ Using the none driver based on existing profile
👍 Starting control plane node minikube in cluster minikube
🔄 Restarting existing none bare metal machine for "minikube" ...
ℹ️ OS release is Rocky Linux 8.4 (Green Obsidian)
🐳 Preparing Kubernetes v1.22.2 on Docker 20.10.8 ...
💢 initialization failed, will try again: wait: /bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.22.2:$PATH kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem": exit status 127
stdout:
stderr:
env: ‘space’: No such file or directory
💣 Error starting cluster: wait: /bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.22.2:$PATH kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem": exit status 127
stdout:
stderr:
env: ‘space’: No such file or directory
╭───────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ 😿 If the above advice does not help, please let us know: │
│ 👉 https://github.com/kubernetes/minikube/issues/new/choose │
│ │
│ Please run `minikube logs --file=logs.txt` and attach logs.txt to the GitHub issue. │
│ │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
❌ Exiting due to GUEST_START: wait: /bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.22.2:$PATH kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem": exit status 127
stdout:
stderr:
env: ‘space’: No such file or directory
╭───────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ 😿 If the above advice does not help, please let us know: │
│ 👉 https://github.com/kubernetes/minikube/issues/new/choose │
│ │
│ Please run `minikube logs --file=logs.txt` and attach logs.txt to the GitHub issue. │
│ │
╰───────────────────────────────────────────────────────────────────────────────────────────╯ |
kvm2 driver with docker runtime
Times for minikube (PR 12617) start: 47.8s 47.3s 47.5s 49.2s 47.9s Times for minikube ingress: 31.9s 33.3s 34.7s 33.2s 33.7s docker driver with docker runtime
Times for minikube (PR 12617) start: 21.1s 21.1s 20.8s 21.4s 22.4s Times for minikube ingress: 34.4s 27.9s 35.9s 35.5s 27.4s docker driver with containerd runtime
Times for minikube start: 30.9s 43.5s 44.0s 43.1s 44.1s Times for minikube ingress: 28.4s 33.9s 36.4s 33.0s 36.9s |
` @marwatk I am curious, what would be a real world example that a path would have space in it ? was it a corrupt path env? |
@medyagh WSL2 adds your Windows path to your linux path to launch windows apps from the linux shell. Some of these can have spaces (like
|
These are the flake rates of all failed tests.
To see the flake rates of all tests by environment, click here. |
That makes sense thanks for the explanation |
And thank you for fixing this for everyone else |
Experimenting with minikube on bare metal in WSL2 breaks if Windows has put any items in your path containing spaces (e.g.
Program Files
):This simple patch corrects the behavior.
Because of the simplicity of the change I didn't alter any tests but I'm happy to if necessary.