Skip to content

Commit

Permalink
Check for etcd, but not /etc
Browse files Browse the repository at this point in the history
  • Loading branch information
tstromberg committed Nov 15, 2019
1 parent 39c0c8b commit 2223c89
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pkg/minikube/bootstrapper/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,11 @@ var KubeadmExtraArgsWhitelist = map[int][]string{
}

// remote artifacts that must exist for minikube to function properly. The sign of a previously working installation.
// NOTE: /etc is not persistent across restarts, so don't bother checking there
var expectedArtifacts = []string{
"/etc/kubernetes/scheduler.conf",
"/etc/kubernetes/kubelet.conf",
"/var/lib/kubelet/kubeadm-flags.env",
"/var/lib/kubelet/config.yaml",
"/var/lib/minikube",
"/etc/kubernetes/manifests/kube-apiserver.yaml",
"/etc/kubernetes/manifests/etcd.yaml",
etcdDataDir(),
}

// yamlConfigPath is the path to the kubeadm configuration
Expand Down Expand Up @@ -234,7 +231,8 @@ func (k *Bootstrapper) createCompatSymlinks() error {
}

func (k *Bootstrapper) existingConfig() error {
_, err := k.c.RunCmd(exec.Command("ls", expectedArtifacts...))
args := append([]string{"ls"}, expectedArtifacts...)
_, err := k.c.RunCmd(exec.Command("sudo", args...))
return err
}

Expand Down Expand Up @@ -266,7 +264,7 @@ func (k *Bootstrapper) StartCluster(k8s config.KubernetesConfig) error {
ignore := []string{
fmt.Sprintf("DirAvailable-%s", strings.Replace(vmpath.GuestManifestsDir, "/", "-", -1)),
fmt.Sprintf("DirAvailable-%s", strings.Replace(vmpath.GuestPersistentDir, "/", "-", -1)),
fmt.Sprintf("DirAvailable-%s", etcdDataDir(), "/", "-", -1)),
fmt.Sprintf("DirAvailable-%s", strings.Replace(etcdDataDir(), "/", "-", -1)),
"FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml",
"FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml",
"FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml",
Expand Down

0 comments on commit 2223c89

Please sign in to comment.