Merge pull request #8664 from tstromberg/none-timeout

none: Fix 'minikube delete' issues when the apiserver is down
pull/8468/head
Thomas Strömberg 2020-07-09 14:16:14 -07:00 committed by GitHub
commit ca9040b42b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -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
}

View File

@ -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)
}