-
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
kvm2: minikube start fails after host reboot: "network 'minikube-net' is not active' #2513
Comments
if you have virt-manager package you can do: on the UI, go to menu Edit > Connection Details and on the resulting dialog box select the Virtual Network Tab. I use archlinux so package name might be different. to start |
@codmajik thanks for your response. |
On a fresh Fedora 27 install, I run into the same problem about domain not found |
To resolve this: Assuming you can access virsh do the following:
|
I was able to resolve this on Fedora 27.
The issue for me seems to stem from the minikube-net trying to also occupy virbr0, which is what default does naturally. Ideally, minikube-net should pick another default. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
The fix provided by @andrewbenton works for me but I have to apply it each time my machine restarts, otherwise I keep having this error |
On Arch Linux I had to fix this with:
The |
On Debian stretch I have similar problem after machine restarted normally. minikube version: v0.28.2 After following @zikes instructions, minikube can start, but one of the deployments (http-echo) cannot start anymore. get pods shows:
syslog has a bunch of:
|
also virsh net-autostart minikube-net --> to have a persistent minikube-net over restarts |
Thanks @nirmoy , that works for me. Also, for my deployment not running anymore problem, it is due to I used environment variable that clashed with the one generated by kubernetes using the deployment name as prefix. Perhaps it is good to advice users of this behavior in the doc. |
There seem to be two problems discussed here in the ticket:
and I can actually see the bug in the source code, and I'm in the process of writing a fix and making a PR for it: it's coming from here: minikube/pkg/drivers/kvm/network.go Line 47 in 616c3e5
The problem is that because of the wrong variable being used, the private network that is created does not get the autostart feature, and when minikube gets stopped the network is inactive. It is not being recreated on another
I'm unclear as to why people run into this second issue. And I can't reproduce this here either so far because the used template correctly omits to specify a bridge in the XML which means according to the libvirt docs that it creates the next free If people could give me a bit more insight for the second problem, I hope that I'm able to address both in one PR. |
My fix seems to work, will need to check in with my company to see how exactly I am allowed to create the PR (organization forked repo vs my private github forked repo for the PR). |
The branch is up for anybody who already wants to take a peak: https://github.com/etherparty/minikube/tree/fix-issue-2513 We are currently working on signing of the CNCF CLA as an organization, then I can do the PR. |
@mheese - Great news. Feel free to send the PR to myself. In the mean time, I'm using this workaround the first time I run into it: sudo virsh net-autostart minikube-net
sudo virsh net-start minikube-net |
@tstromberg created the PR, it's linked above. Feel free to ping me on the Kubernetes slack. I'm |
Surprisingly, I ran into this today with v0.30.0: worked around it by using |
@tstromberg that actually would exactly mean that this has not been included in 0.30.0 ... because that is kind of what it fixes. However, was that a minikube VM that already existed prior to 0.30.0? |
@mheese - Good point, I'm not sure in this case. I'll let you know the next time I see breakage (along with logs), since it would definitely be with a post-0.30.0 VM. |
I think this may still be an issue, at least on the version of Debian I have. To replicate: |
@tstromberg which Debian version are you running? I'll try to reproduce it because I really can't :) ... the problem is totally gone for me. The driver is now creating the network with autostart, plus it is actually starting the network if it is not active. So it really should be covered. |
I tried to duplicate this in v0.33.1, but I couldn't across several reboots. I know there is a latent condition here somewhere, but I'm going to close this for now until we see it again and can root cause it appropriately. Thank you @mheese! |
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
bug
Environment:
Minikube version (use
minikube version
):0.25
Fedora 26
cat ~/.minikube/machines/minikube/config.json | grep DriverName
):kvm2
cat ~/.minikube/machines/minikube/config.json | grep -i ISO
orminikube ssh cat /etc/VERSION
):The above can be generated in one go with the following commands (can be copied and pasted directly into your terminal):
What happened:
minikube start --vm-driver=kvm2
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
E0204 22:35:52.820568 30508 start.go:159] Error starting host: Error starting stopped host: Error creating VM: virError(Code=55, Domain=19, Message='Requested operation is not valid: network 'minikube-net' is not active').
How to reproduce it (as minimally and precisely as possible):
minikube start --vm-driver=kvm2
The text was updated successfully, but these errors were encountered: