Closed etix closed 3 years ago
Since docker and kvm2 drivers don't work, the only workaround I've found so far is using --driver=virtualbox
@prezha please take a look
@etix thanks for reporting the issue and providing the full log!
this is a strange issue that i haven't seen before - quite unexpected as looking up for a free network for docker driver starts from 192.168.49.0
and for kvm starts from 192.168.39.0
and i'd expect to see those as the first try (then they are incremented with steps of 9 and 11 respectively), whereas you get all 20 retries starting and staying with 192.168.0.0
are you using precompiled minikube (and docker-machine-driver-kvm2 - for kvm) binary or you are building from source?
does it report the same 20 messages for kvm as well? ie:
network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
can you also please share the output of:
ip a s
ip r s
minikube version
docker-machine-driver-kvm2 version
Hi @prezha,
I should mention that my setup was working fine for months without any major issue. I think that I built my last successful k8s env two or three weeks ago. This morning I did my usual weekly minikube delete
and minikube start
when the problem occurred. Nothing really changed besides the usual Archlinux rolling updates and a bios upgrade I did around a week ago.
I'm using the minikube pre-built archlinux package same for docker. The docker-machine-driver-kvm2
plugin seems to be installed by minikube itself in ~/.minikube/bin/docker-machine-driver-kvm2.
I've noticed that the loop was not actually increasing the IP addresses too, I even looked at the code itself when I decided to open the issue. Previously I had my minikube always on the 192.168.49.x range. I still have my /etc/hosts
populated with mappings to 192.168.49.2.
Of course the minikube configuration is not part of the equation, I did multiple minikube delete --all --purge
and rm -fr ~/.minikube/
along the way.
KVM also reports the same 20 messages:
I0420 19:50:42.346217 192153 main.go:126] libmachine: (minikube) Creating KVM machine...
I0420 19:50:42.348820 192153 main.go:126] libmachine: (minikube) DBG | found existing default KVM network
I0420 19:50:42.349941 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.349835 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.350709 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.350661 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.351470 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.351436 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.352215 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.352171 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.352965 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.352928 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.353715 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.353670 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.354449 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.354410 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.355180 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.355133 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.355912 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.355877 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.356646 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.356598 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.357370 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.357338 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.358121 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.358077 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.358870 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.358835 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.359640 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.359578 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.360364 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.360332 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.361115 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.361070 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.361853 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.361818 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.363421 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.363359 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.364164 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.364138 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.364732 192153 main.go:126] libmachine: (minikube) DBG | I0420 19:50:42.364688 192425 network.go:215] skipping subnet 192.168.0.0/16 that is taken: &{IP:192.168.0.0 Netmask:255.255.0.0 Prefix:16 CIDR:192.168.0.0/16 Gateway:192.168.0.4 ClientMin:192.168.0.5 ClientMax:192.168.255.254 Broadcast:192.168.255.255 Interface:{IfaceName:enp38s0 IfaceIPv4:192.168.0.4 IfaceMTU:1500 IfaceMAC:00:d8:61:79:a1:21}}
I0420 19:50:42.364755 192153 main.go:126] libmachine: (minikube) DBG | failed to find free subnet for private KVM network mk-minikube after 20 attempts: no free private network subnets found with given parameters (start: "192.168.11.0", step: 11, tries: 20)
Command outputs
ip a s
:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp38s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:d8:61:79:a1:21 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.4/16 brd 192.168.255.255 scope global dynamic enp38s0
valid_lft 66533sec preferred_lft 66533sec
inet6 2a01:e0a:2f2:1090:2d8:61ff:fe79:a121/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 2591984sec preferred_lft 604784sec
inet6 fe80::2d8:61ff:fe79:a121/64 scope link
valid_lft forever preferred_lft forever
3: wlo1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether d0:ab:d5:1b:5c:97 brd ff:ff:ff:ff:ff:ff
altname wlp40s0
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:c6:2a:4b brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:52:f9:32:08 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
inet6 fe80::42:52ff:fef9:3208/64 scope link
valid_lft forever preferred_lft forever
6: vboxnet0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
inet 192.168.99.1/24 brd 192.168.99.255 scope global vboxnet0
valid_lft forever preferred_lft forever
inet6 fe80::800:27ff:fe00:0/64 scope link
valid_lft forever preferred_lft forever
ip r s
:
default via 192.168.0.1 dev enp38s0 proto dhcp src 192.168.0.4 metric 1024
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
192.168.0.0/16 dev enp38s0 proto kernel scope link src 192.168.0.4
192.168.0.1 dev enp38s0 proto dhcp scope link src 192.168.0.4 metric 1024
192.168.99.0/24 dev vboxnet0 proto kernel scope link src 192.168.99.1 linkdown
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
minikube version
:
minikube version: v1.19.0
commit: 15cede53bdc5fe242228853e737333b09d4336b5-dirty
~/.minikube/bin/docker-machine-driver-kvm2 version
:
version: v1.19.0
commit: 15cede53bdc5fe242228853e737333b09d4336b5
I tried downgrading minikube to 1.17.1 which was known to be working and it seems the IP 192.168.49.2 is correctly selected but the control plane isn't able to start. So my guess is that something external to minikube broke.
@etix thanks a lot for the input, that was useful - i think i know what the problem might be:
ip a s
:
2: enp38s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:d8:61:79:a1:21 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.4/16 brd 192.168.255.255 scope global dynamic enp38s0
so, the 192.168.0.0/16
network would overlap with any 192.168.x.0/24
subnet we are trying to reserve, and that then makes sense
would you be able to set/use any 192.168.y.0/24
network for your enp38s0 interface?
This network configuration has been working for more than a year with minikube < 1.19 but I see your point :+1:
sudo ip address del 192.168.0.4/16 dev enp38s0
sudo ip address add 192.168.0.4/24 dev enp38s0
There's some good progress indeed, the weird subnet reservation loop is now gone (:tada:) but I end up like in 1.17.1 with a non-functional control-plane. Might be a separate issue but the coincidence is troubling.
After further investigations about the control plane "not starting" I see this error looping:
The connection to the server localhost:8443 was refused - did you specify the right host or port?
If I'm guessing correctly docker-proxy
should be the one listening and indeed the process is running:
root 341573 0.0 0.0 1148956 4084 ? Sl 21:04 0:00 /usr/bin/docker-proxy -proto tcp -host-ip 127.0.0.1 -host-port 49171 -container-ip 192.168.49.2 -container-port 8443
BUT ss
doesn't list any application listening on that port (I could really be wrong here, I was more used to netstat
back in the days) but telnet confirms that the connection is indeed refused.
great progress, glad it helped!
now, it could be that the
if you hate playing with it manually, you could try setting the iface ip with netmask 24 using higher-level tools (not sure what arch is using) that will do all the necessary changes for you, then maybe even reboot and try again
if that doesn't help, please close this one and open another issue, again with complete logs (ie, with --alsologtostderr -v=9) so that we leave this one with a solution to the original problem for future reference
Splitting my local network from one large 192.168.0.0/16
to smaller 192.168.0.0/24
prevents the no free private network subnets found
problem that appears in minikube 1.19.
I'm closing this issue even if I'm still unable to start the control plane successfully. I'll reference this issue in a new one if they are somehow related.
Steps to reproduce the issue:
Details
OS: ArchLinux (kernel 5.11.15) Minikube version: 1.19.0 Docker version: 20.10.6 Systemd: 248
I tried to reboot the system multiple times and tried to use the kvm2 driver. Same issue.
Full output of failed command: