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.
This makefile dependency is currently only on the folder, not the files
within. With this PR, the makefile will rebuild the assets when
changes are made to deploy/addons
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.