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

Driver auto-detection can hang minikube #6228

Closed
mcabrams opened this issue Jan 7, 2020 · 8 comments · Fixed by #6422
Closed

Driver auto-detection can hang minikube #6228

mcabrams opened this issue Jan 7, 2020 · 8 comments · Fixed by #6422
Assignees
Labels
co/virtualbox kind/bug Categorizes issue or PR as related to a bug. os/linux priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/needs-information Indicates an issue needs more information in order to work on it.
Milestone

Comments

@mcabrams
Copy link

mcabrams commented Jan 7, 2020

Minikube versions in 1.5.x all work properly and proceed properly after running minikube start --vm-driver=virtualbox but for each version of 1.6.x that I've tried, everything hangs.

The logs seem to indicate that a config.json is missing, but from advice I've seen, this should be created upon minikube start and should not be manually added. I've tried switching back and forth between versions and each time the 1.5.2 works properly, but 1.6.0/1.6.2 always hangs (I've left it for 20+ minutes).

I am running with a ryzen CPU, but not sure if this is related to #6168 as the examples mentioned there seem to get further in the process after minikube start than mine does.

The exact command to reproduce the issue:
minikube start --vm-driver=virtualbox

The full output of the command that failed:

$ minikube start --vm-driver=virtualbox
🎉  minikube 1.6.2 is available! Download it: https://github.com/kubernetes/minikube/releases/tag/v1.6.2
💡  To disable this notice, run: 'minikube config set WantUpdateNotification false'

🙄  minikube v1.6.0 on Ubuntu 19.10

The output of the minikube logs command:

$ minikube logs

💣  Error getting config: stat /home/myuser/.minikube/profiles/minikube/config.json: no such file or directory

😿  minikube is exiting due to an error. If the above message is not useful, open an issue:
👉  https://github.com/kubernetes/minikube/issues/new/choose

The operating system version:
Ubuntu 19.10

@tstromberg
Copy link
Contributor

Do you mind providing the output of minikube v1.6.2 with:

minikube start --alsologtostderr

I suspect your intuition about this being related to #6168 is correct. To test this, you can try reverting to the old ISO image by using:

minikube delete && minikube start --iso-url='https://storage.googleapis.com/minikube/iso/minikube-v1.5.0.iso

@tstromberg tstromberg added the triage/needs-information Indicates an issue needs more information in order to work on it. label Jan 8, 2020
@tstromberg tstromberg changed the title minikube 1.6.x hangs on start Ubuntu 19.10 minikube 1.6.x hangs on start Ubuntu 19.10 (ryzen) Jan 8, 2020
@tstromberg tstromberg changed the title minikube 1.6.x hangs on start Ubuntu 19.10 (ryzen) virtualbox: hang on start with Ubuntu 19.10 (ryzen) Jan 8, 2020
@tstromberg tstromberg added co/virtualbox os/linux kind/bug Categorizes issue or PR as related to a bug. labels Jan 8, 2020
@mcabrams
Copy link
Author

mcabrams commented Jan 9, 2020

@tstromberg here's the output (it hangs on last line):

$ minikube start --alsologtostderr --vm-driver=virtualbox
W0108 16:32:45.090566   30300 root.go:241] Error reading config file at /home/myuser/.minikube/config/config.json: open /home/myuser/.minikube/config/config.json: no such file or directory
I0108 16:32:45.090993   30300 notify.go:125] Checking for updates...
I0108 16:32:45.270200   30300 start.go:255] hostinfo: {"hostname":"myuser-desktop","uptime":18752,"bootTime":1578511213,"procs":506,"os":"linux","platform":"ubuntu","platformFamily":"debian","platformVersion":"19.10","kernelVersion":"5.3.0-26-generic","virtualizationSystem":"kvm","virtualizationRole":"host","hostid":"c2f87451-0314-4c67-b804-da631aaaae7d"}
I0108 16:32:45.271208   30300 start.go:265] virtualization: kvm host
😄  minikube v1.6.2 on Ubuntu 19.10
I0108 16:32:45.271313   30300 start.go:555] selectDriver: flag="virtualbox", old=<nil>
I0108 16:32:45.271333   30300 global.go:60] Querying for installed drivers using PATH=/home/myuser/.minikube/bin:/home/myuser/.nvm/versions/node/v10.17.0/bin:/home/myuser/.local/bin:/home/myuser/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

and the output for the second command (it too hangs on last line):

$ minikube delete && minikube start --iso-url='https://storage.googleapis.com/minikube/iso/minikube-v1.5.0.iso' --alsologtostderr
🙄  "minikube" profile does not exist
🙄  "minikube" cluster does not exist. Proceeding ahead with cleanup.
💔  The "minikube" cluster has been deleted.
🔥  Successfully deleted profile "minikube"
I0108 16:37:33.158165   30941 notify.go:125] Checking for updates...
I0108 16:37:33.314189   30941 start.go:255] hostinfo: {"hostname":"myuser-desktop","uptime":19040,"bootTime":1578511213,"procs":508,"os":"linux","platform":"ubuntu","platformFamily":"debian","platformVersion":"19.10","kernelVersion":"5.3.0-26-generic","virtualizationSystem":"kvm","virtualizationRole":"host","hostid":"c2f87451-0314-4c67-b804-da631aaaae7d"}
I0108 16:37:33.315193   30941 start.go:265] virtualization: kvm host
😄  minikube v1.6.2 on Ubuntu 19.10
I0108 16:37:33.315312   30941 start.go:555] selectDriver: flag="", old=<nil>
I0108 16:37:33.315326   30941 global.go:60] Querying for installed drivers using PATH=/home/myuser/.minikube/bin:/home/myuser/.nvm/versions/node/v10.17.0/bin:/home/myuser/.local/bin:/home/myuser/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

@mcabrams
Copy link
Author

mcabrams commented Jan 9, 2020

For comparison, upon removing 1.6.2 and installing 1.5.2, when running the same command, instead of the line about "Querying for installed drivers" it simply has selected: virtualbox and things continue as normal from there.

@medyagh
Copy link
Member

medyagh commented Jan 22, 2020

@mcabrams thank you for creating this issue, so to be clear, the minikube auto detect the driver hangs and an older verison of minikube works fine ?
have you had chancee to confirm this exists in the latest beta release ?

@medyagh medyagh changed the title virtualbox: hang on start with Ubuntu 19.10 (ryzen) auto driver detect hangs Ubuntu 19.10 (ryzen) Jan 22, 2020
@mcabrams
Copy link
Author

@mcabrams thank you for creating this issue, so to be clear, the minikube auto detect the driver hangs and an older verison of minikube works fine ?

Yep, 1.5.x works great and 1.6.x hangs on that last line about querying for installed drivers.

have you had chancee to confirm this exists in the latest beta release ?

No, I'll try to test it out later tonight, thanks!

@dan-vaughan
Copy link

dan-vaughan commented Jan 29, 2020

Hi - I was suffering from an identical error, on the same version of Ubuntu, also on a Ryzen CPU, however with only kvm2 installed.

I tried installing version 1.7.0-beta.1 and found the same error (pasted below for completeness)

Command to reproduce the issue
minikube start --vm-driver=kvm2 --alsologtostderr

Full output
I0129 17:12:17.119682   12264 start.go:258] hostinfo: {"hostname":"computer-name","uptime":1681,"bootTime":1580316256,"procs":484,"os":"linux","platform":"ubuntu","platformFamily":"debian","platformVersion":"19.10","kernelVersion":"5.3.0-29-generic","virtualizationSystem":"kvm","virtualizationRole":"host","hostid":"689cf295-a1c1-427d-b370-2398ae2c1c63"}
I0129 17:12:17.120543   12264 start.go:268] virtualization: kvm host
😄  minikube v1.7.0-beta.1 on Ubuntu 19.10
I0129 17:12:17.120626   12264 start.go:578] selectDriver: flag="kvm2", old=<nil>
I0129 17:12:17.120645   12264 driver.go:189] Setting default libvirt URI to qemu:///system
I0129 17:12:17.120659   12264 global.go:60] Querying for installed drivers using PATH=/home/username/.minikube/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Command to reproduce the issue
minikube start --alsologtostderr

Full output
I0129 17:12:39.484884   12348 notify.go:125] Checking for updates...
I0129 17:12:39.635564   12348 start.go:258] hostinfo: {"hostname":"computer-name","uptime":1703,"bootTime":1580316256,"procs":470,"os":"linux","platform":"ubuntu","platformFamily":"debian","platformVersion":"19.10","kernelVersion":"5.3.0-29-generic","virtualizationSystem":"kvm","virtualizationRole":"host","hostid":"689cf295-a1c1-427d-b370-2398ae2c1c63"}
I0129 17:12:39.636414   12348 start.go:268] virtualization: kvm host
😄  minikube v1.7.0-beta.1 on Ubuntu 19.10
I0129 17:12:39.636523   12348 start.go:578] selectDriver: flag="", old=<nil>
I0129 17:12:39.636539   12348 driver.go:189] Setting default libvirt URI to qemu:///system
I0129 17:12:39.636556   12348 global.go:60] Querying for installed drivers using PATH=/home/username/.minikube/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
I0129 17:12:39.662659   12348 global.go:68] docker priority: 2, state: {Installed:true Healthy:false Error:exit status 1 Fix:Docker is not running. Try: restarting docker desktop. Doc:}

Logs output after either command
minikube logs

Full output

💣  Error getting config: stat /home/username/.minikube/profiles/minikube/config.json: no such file or directory

😿  minikube is exiting due to an error. If the above message is not useful, open an issue:
👉  https://github.com/kubernetes/minikube/issues/new/choose

OS Version
Ubuntu 19.10

CPU Chipset
Ryzen

@tstromberg tstromberg added this to the v1.7.0 milestone Jan 29, 2020
@tstromberg
Copy link
Contributor

tstromberg commented Jan 29, 2020

I ran into this today myself on macOS at HEAD. I'm not sure what command it was, but suspect it was docker related. Docker for Desktop was installed, but stopped.

We need to put context timeouts for the auto-detection commands: none of them should take >1 second, for instance.

@tstromberg tstromberg changed the title auto driver detect hangs Ubuntu 19.10 (ryzen) Driver auto-detection can hang minikube Jan 29, 2020
@tstromberg tstromberg added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Jan 29, 2020
@tstromberg
Copy link
Contributor

tstromberg commented Jan 29, 2020

After some investigation, it seems to be related on my end to there being a stale eval (minikube docker-env) call, resulting in a docker command not hanging. Starting a new shell without the environment works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/virtualbox kind/bug Categorizes issue or PR as related to a bug. os/linux priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants