1
0
mirror of https://github.com/rancher/rke.git synced 2025-07-13 15:15:59 +00:00

Merge pull request #213 from galal-hussein/longer_healthchecks

Increase healthcheck timeout to 50 seconds per service
This commit is contained in:
Alena Prokharchyk 2018-01-12 13:36:16 -08:00 committed by GitHub
commit d916bd40a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ func runHealthcheck(ctx context.Context, host *hosts.Host, port int, useTLS bool
if err != nil { if err != nil {
return fmt.Errorf("Failed to initiate new HTTP client for service [%s] for host [%s]", serviceName, host.Address) return fmt.Errorf("Failed to initiate new HTTP client for service [%s] for host [%s]", serviceName, host.Address)
} }
for retries := 0; retries < 3; retries++ { for retries := 0; retries < 10; retries++ {
if err = getHealthz(client, useTLS, serviceName, host.Address); err != nil { if err = getHealthz(client, useTLS, serviceName, host.Address); err != nil {
logrus.Debugf("[healthcheck] %v", err) logrus.Debugf("[healthcheck] %v", err)
time.Sleep(5 * time.Second) time.Sleep(5 * time.Second)