Skip to content

Commit ca9040b

Browse files
authored
Merge pull request #8664 from tstromberg/none-timeout
none: Fix 'minikube delete' issues when the apiserver is down
2 parents c83e6c4 + f8068d0 commit ca9040b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pkg/minikube/bootstrapper/bsutil/kverify/api_server.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,13 @@ func apiServerHealthz(hostname string, port int) (state.State, error) {
205205
return nil
206206
}
207207

208-
err = retry.Local(check, 8*time.Second)
208+
err = retry.Local(check, 5*time.Second)
209+
210+
// Don't propagate 'Stopped' upwards as an error message, as clients may interpret the err
211+
// as an inability to get status. We need it for retry.Local, however.
212+
if st == state.Stopped {
213+
return st, nil
214+
}
209215
return st, err
210216
}
211217

pkg/util/retry/retry.go

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ func Local(callback func() error, maxTime time.Duration) error {
3636
b.InitialInterval = 250 * time.Millisecond
3737
b.RandomizationFactor = 0.25
3838
b.Multiplier = 1.25
39+
b.MaxElapsedTime = maxTime
3940
return backoff.RetryNotify(callback, b, notify)
4041
}
4142

0 commit comments

Comments
 (0)