From 6b57d9c6436b5aefc461306aaf2032cb47411934 Mon Sep 17 00:00:00 2001 From: Fabian Gonzalez Date: Thu, 2 Apr 2026 10:13:04 -0400 Subject: [PATCH] use /ping for daemon ready check instead of /version Signed-off-by: Fabian Gonzalez --- pkg/daemon/health.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/daemon/health.go b/pkg/daemon/health.go index 412284a7..726587d9 100644 --- a/pkg/daemon/health.go +++ b/pkg/daemon/health.go @@ -14,11 +14,11 @@ type HealthChecker struct { // IsResponding checks if the server is responding func (h *HealthChecker) IsResponding() bool { httpClient := &http.Client{Timeout: 2 * time.Second} - versionURL := strings.TrimRight(h.BaseURL, "/") + "/version" + pingURL := strings.TrimRight(h.BaseURL, "/") + "/ping" const maxRetries = 3 for i := range maxRetries { - resp, err := httpClient.Get(versionURL) + resp, err := httpClient.Get(pingURL) if err == nil { defer resp.Body.Close() if resp.StatusCode == http.StatusOK { @@ -42,7 +42,7 @@ func (h *HealthChecker) WaitForReady(timeout time.Duration) error { resp, err := httpClient.Get(pingURL) if err == nil { resp.Body.Close() - if resp.StatusCode >= 200 && resp.StatusCode < 300 { + if resp.StatusCode == http.StatusOK { return nil } }