handle minikube status retruning error for no good reason
parent
b08a2d8f92
commit
5f16becbab
|
@ -56,8 +56,7 @@ func testGvisorRestart(t *testing.T) {
|
|||
t.Fatalf("waiting for gvisor controller to be up: %v", err)
|
||||
}
|
||||
|
||||
mk.RunCommand("stop", false)
|
||||
mk.CheckStatus(state.Stopped.String())
|
||||
mk.RunCommand("stop", true)
|
||||
stdout, stderr, err := mk.Start()
|
||||
if err != nil {
|
||||
t.Fatalf("failed to start minikube (for profile %s) failed : %v \nstdout: %s \nstderr: %s", t.Name(), err, stdout, stderr)
|
||||
|
|
|
@ -287,10 +287,11 @@ func (m *MinikubeRunner) Status() (status string, stderr string, err error) {
|
|||
cmd := fmt.Sprintf("status --format={{.Host}} %s", m.GlobalArgs)
|
||||
s := func() error {
|
||||
status, stderr, err = m.RunCommandRetriable(cmd)
|
||||
status = strings.TrimRight(status, "\n")
|
||||
return err
|
||||
}
|
||||
err = RetryX(s, 2*time.Minute)
|
||||
if err != nil && status == state.None.String() {
|
||||
if err != nil && (status == state.None.String() || status == state.Stopped.String()) {
|
||||
err = nil // because https://github.com/kubernetes/minikube/issues/4932
|
||||
}
|
||||
return status, stderr, err
|
||||
|
|
Loading…
Reference in New Issue