Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
fix: clear stale errors after successful cluster operations
rcourtman1b5528356b05
diff --git a/pkg/proxmox/cluster_client.go b/pkg/proxmox/cluster_client.goindex 61350f5a12..8fb8cd315d 100644--- a/pkg/proxmox/cluster_client.go+++ b/pkg/proxmox/cluster_client.go@@ -363,6 +363,9 @@ func (cc *ClusterClient) getHealthyClient(ctx context.Context) (*Client, error)Int("nodes", len(testNodes)).Msg("Cluster endpoint passed connectivity test")+ // Clear any stale error from previous failures now that connectivity succeeded+ delete(cc.lastError, selectedEndpoint)+// Create the actual client with full timeoutnewClient, err := NewClient(cfg)if err != nil {@@ -397,6 +400,13 @@ func (cc *ClusterClient) markUnhealthyWithError(endpoint string, errMsg string)cc.lastHealthCheck[endpoint] = time.Now()}+// clearEndpointError removes any cached error for an endpoint after successful operations+func (cc *ClusterClient) clearEndpointError(endpoint string) {+ cc.mu.Lock()+ defer cc.mu.Unlock()+ delete(cc.lastError, endpoint)+}+// recoverUnhealthyNodes attempts to recover unhealthy nodesfunc (cc *ClusterClient) recoverUnhealthyNodes(ctx context.Context) {cc.mu.RLock()@@ -570,6 +580,8 @@ func (cc *ClusterClient) executeWithFailover(ctx context.Context, fn func(*Clien// Execute the functionerr = fn(client)if err == nil {+ // Clear any stale error for this endpoint on success+ cc.clearEndpointError(clientEndpoint)return nil}lastErr = err