Running `minikube stop` while nothing is running results in a crash.
This patch makes `cluster.StopHost()` swallow the stop-while-stopped
error libmachine returns.
Also, cache in memory localkube versions in multiple calls to the GCS
bucket. These versions will not change during the life of the minikube
process once fetched and are used multiple times.
* Add support for using raw disks with xhyve, default it to true
* Fix formatting issue
* Prefix disk-driver with xhyve to make it clear it is only for xhyve
* Add missing config
docker/machine made a change (https://github.com/docker/machine/pull/3966) to use a systemd drop-in unit (https://coreos.com/os/docs/latest/using-systemd-drop-in-units.html) instead of overwriting the dockerd configuration. This necessitates clearing the ExecStart list inherited from the base config prior to the ExecStart directive in GenerateDockerOptions -- otherwise, docker.service fails to start with log output like "docker.service: Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing."
When invoking localkube a certificate is not correctly generated for the
target ip. For example, when network 10.0.0.1/24 is parsed it generates
a certificate for 10.0.0.0 instead of 10.0.0.1.
Fixed#1215. (with @mhbauer)
If the apiserver is something other than the default, pass in the flag.
This won't be compatible with the old versions of localkube. Old
versions of localkube will work as long as apiserver-name is not
specified in minikube, always using the default.
Some componentconfig options are aliased to native convertible types
(e.g. ProxyMode) but FindAndSet() was unable to detect that and so it
wasn't possible to set these values via `--extra-config`.
This change addresses that by using the reflected value's Kind instead
of a type assertion on its interface.
It's also worth noting that any value with the type Duration (e.g.
proxy.IPTablesSyncPeriod) is also unable to be set for the same reason,
but this commit does not address that.
See https://github.com/kubernetes/minikube/issues/1217
In case of KVM driver, "minikube mount" does not work, when mounting any
host directory via 9pfs. That's because in case of the KVM driver, a
different IP address is assigned to the host, 192.168.42.1, while other
drivers assign 10.0.2.2. That's why the following command hangs forever
inside the VM.
```
$ sudo mount -t 9p -o trans=tcp -o port=5640 10.0.2.2 /mount-9p
```
Fix it by changing the host IP address for the KVM driver.
TestSetupKubeConfig fails when running "go test --race", because of
concurrent accesses from multiple goroutines.
```
WARNING: DATA RACE
Write at 0x00c4201cc4b8 by goroutine 16:
k8s.io/minikube/pkg/minikube/kubeconfig.TestSetupKubeConfig.func1()
k8s.io/minikube/pkg/minikube/kubeconfig/config_test.go:103 +0x23a
testing.tRunner()
/usr/local/golang/src/testing/testing.go:657 +0x107
```
To fix that, convert KubeConfigFile to an atomic value that stores
string. Callers should run helper functions, SetKubeConfigFile() and
GetKubeConfigFile() instead of direct access to the value.
TestGetLocalkubeStatus fails when running "go test --race", because of
concurrent accesses from multiple goroutines.
```
WARNING: DATA RACE
Read at 0x00c420435378 by goroutine 43:
k8s.io/minikube/pkg/minikube/tests.(*SSHServer).Start.func1.1()
k8s.io/minikube/pkg/minikube/tests/ssh_mock.go:122 +0x389
Previous write at 0x00c420435378 by goroutine 40:
k8s.io/minikube/pkg/minikube/cluster.TestGetLocalkubeStatus()
k8s.io/minikube/pkg/minikube/cluster/cluster_test.go:359 +0x540
testing.tRunner()
/usr/local/golang/src/testing/testing.go:657 +0x107
```
To fix that, convert CommandToOutput to an atomic value that stores
the map. Callers should run helper functions, SetCommandToOutput() and
GetCommandToOutput() instead of direct access to the value.
TestCreateSSHShell fails when running "go test --race", because of
concurrent accesses from multiple goroutines.
```
WARNING: DATA RACE
Read at 0x00c42025b730 by goroutine 42:
k8s.io/minikube/pkg/minikube/cluster.TestCreateSSHShell()
k8s.io/minikube/pkg/minikube/cluster/cluster_test.go:523 +0x543
testing.tRunner()
/usr/local/golang/src/testing/testing.go:657 +0x107
Previous write at 0x00c42025b730 by goroutine 49:
k8s.io/minikube/pkg/minikube/tests.(*SSHServer).Start.func1.1()
k8s.io/minikube/pkg/minikube/tests/ssh_mock.go:95 +0x743
```
To fix that, convert HadASessionRequested to an atomic variable.
Callers should run helper functions, SetSessionRequested() and
IsSessionRequested() instead of direct access to the variable.