From 151228ce286bfb8333d1eb68f7459dcd3af39930 Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Wed, 3 Sep 2025 21:53:46 +0000 Subject: [PATCH] fix: resolve 'no healthy nodes available' storage error (addresses #405) - Changed cluster client initialization to be optimistic (assume healthy) - Nodes now start as healthy and are marked unhealthy only on actual failures - This prevents the issue where all nodes were marked unhealthy during init - Storage operations can now proceed even if initial health checks fail - Allows recovery from temporary network or auth issues during startup --- pkg/proxmox/cluster_client.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/proxmox/cluster_client.go b/pkg/proxmox/cluster_client.go index 88b0f6a5a..4103dbbe6 100644 --- a/pkg/proxmox/cluster_client.go +++ b/pkg/proxmox/cluster_client.go @@ -36,12 +36,14 @@ func NewClusterClient(name string, config ClientConfig, endpoints []string) *Clu } // Initialize all endpoints as unknown (will be tested on first use) - // Don't assume they're healthy until proven + // Start optimistically - assume healthy until proven otherwise + // This allows operations to be attempted even if initial health check fails for _, endpoint := range endpoints { - cc.nodeHealth[endpoint] = false // Start pessimistic, will test immediately + cc.nodeHealth[endpoint] = true // Start optimistic, will be marked unhealthy if operations fail } // Do a quick parallel health check on initialization (synchronous to avoid race) + // This will mark unhealthy nodes but won't prevent trying them later cc.initialHealthCheck() return cc