Skip to content

Commit

Permalink
none reliability: --force does not work in v1.10, allow failed kubelet
Browse files Browse the repository at this point in the history
  • Loading branch information
tstromberg committed Aug 22, 2019
1 parent 5d325c7 commit a2999d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/drivers/none/none.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ func stopKubelet(exec command.Runner) error {
if errStatus != nil {
glog.Errorf("temporary error: for %q : %v", cmdCheck, errStatus)
}
if !strings.Contains(out.String(), "dead") {
return fmt.Errorf("expected to kubelet to be dead but it got : %q", out)
if !strings.Contains(out.String(), "dead") && if !strings.Contains(out.String(), "failed") {
return fmt.Errorf("unexpected kubelet state: %q", out)
}
return nil
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/minikube/bootstrapper/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,9 @@ func (k *Bootstrapper) waitForAPIServer(k8s config.KubernetesConfig) error {
// DeleteCluster removes the components that were started earlier
func (k *Bootstrapper) DeleteCluster(k8s config.KubernetesConfig) error {
cmd := fmt.Sprintf("%s reset --force", invokeKubeadm(k8s.KubernetesVersion))
if version.LT(semver.MustParse("1.11.0")) {
cmd := fmt.Sprintf("%s reset", invokeKubeadm(k8s.KubernetesVersion))
}
out, err := k.c.CombinedOutput(cmd)
if err != nil {
return errors.Wrapf(err, "kubeadm reset: %s\n%s\n", cmd, out)
Expand Down

0 comments on commit a2999d9

Please sign in to comment.