Skip to content

Commit

Permalink
Merge pull request #8664 from tstromberg/none-timeout
Browse files Browse the repository at this point in the history
none: Fix 'minikube delete' issues when the apiserver is down
  • Loading branch information
tstromberg committed Jul 9, 2020
2 parents c83e6c4 + f8068d0 commit ca9040b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/minikube/bootstrapper/bsutil/kverify/api_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,13 @@ func apiServerHealthz(hostname string, port int) (state.State, error) {
return nil
}

err = retry.Local(check, 8*time.Second)
err = retry.Local(check, 5*time.Second)

// Don't propagate 'Stopped' upwards as an error message, as clients may interpret the err
// as an inability to get status. We need it for retry.Local, however.
if st == state.Stopped {
return st, nil
}
return st, err
}

Expand Down
1 change: 1 addition & 0 deletions pkg/util/retry/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func Local(callback func() error, maxTime time.Duration) error {
b.InitialInterval = 250 * time.Millisecond
b.RandomizationFactor = 0.25
b.Multiplier = 1.25
b.MaxElapsedTime = maxTime
return backoff.RetryNotify(callback, b, notify)
}

Expand Down

0 comments on commit ca9040b

Please sign in to comment.