The special "default" network is created by libvirt and owned by the
system admin, but we try to delete it when deleting a profile.
To reproduce the issue, start and delete minikube on a system without
any other vm using the libvirt default network:
minikube start --driver kvm2 --network default
minikube delete
The default network will be delete, and the next minikube start will
fail, complaining about missing libvirt default networking and linking
to the complicated instructions how to recreate it.
Now we skip deletion of the special "default" network.
Example run log:
$ out/minikube delete -v10 --logtostderr 2>delete.log
* Deleting "minikube" in kvm2 ...
* Removed all traces of the "minikube" cluster.
$ cat delete.log
...
I0518 03:41:27.148838 1247331 out.go:177] * Deleting "minikube" in kvm2 ...
I0518 03:41:27.148857 1247331 main.go:141] libmachine: (minikube) Calling .Remove
I0518 03:41:27.149156 1247331 main.go:141] libmachine: (minikube) DBG | Removing machine...
I0518 03:41:27.159000 1247331 main.go:141] libmachine: (minikube) DBG | Trying to delete the networks (if possible)
I0518 03:41:27.169497 1247331 main.go:141] libmachine: (minikube) DBG | Using the default network, skipping deletion
I0518 03:41:27.169598 1247331 main.go:141] libmachine: (minikube) Successfully deleted networks
...
On platforms where dhcp lease status is not updated immediately after
domain creation it fails to list ip addresses until next refresh
happens resulting in the following error:
8<----------8<----------8<----------8<----------8<----------8<----------
Creating kvm2 VM (CPUs=2, Memory=4096MB, Disk=20480MB) ...
Failed to start kvm2 VM. Running "minikube delete" may fix it: creating
host: create: Error creating machine: Error in driver during machine
creation: IP not available after waiting: machine minikube didn't
return IP after 1 minute
Exiting due to GUEST_PROVISION: Failed to start host: creating host:
create: Error creating machine: Error in driver during machine
creation: IP not available after waiting: machine minikube didn't
return IP after 1 minute
8<----------8<----------8<----------8<----------8<----------8<----------
Using ARP instead of LEASE for ip address query is justifiable as
listing is done following the domain creation. In case of failure we
fallback to listing via LEASE source.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
Previously we were mixed between the two forms. This commit picks %v,
which is consistent with the Kubernetes code base. They both effectively
do the same thing in this case, though %v works with any object, and %s
only with string objects.