fix: ensure proxmox nodes are displayed even if cluster endpoints are missing

Fixes #727. Previously, if temperature monitoring was enabled and a node wasn't found in ClusterEndpoints, the entire node processing was skipped. This change ensures we only skip temperature collection.
This commit is contained in:
courtmanr@gmail.com 2025-11-22 23:31:30 +00:00
parent f8647b53ff
commit d5fdf2f471

View file

@ -6165,6 +6165,7 @@ func (m *Monitor) pollPVEInstance(ctx context.Context, instanceName string, clie
// Prefer the resolved host for this node, with cluster overrides when available.
sshHost := modelNode.Host
foundNodeEndpoint := false
shouldCollect := true
if modelNode.IsClusterMember && instanceCfg.IsCluster {
// For cluster members, wait until we have validated endpoints
@ -6175,9 +6176,8 @@ func (m *Monitor) pollPVEInstance(ctx context.Context, instanceName string, clie
Str("node", node.Node).
Str("instance", instanceCfg.Name).
Msg("Skipping temperature collection - cluster endpoints not yet validated")
continue
}
shouldCollect = false
} else {
hasFingerprint := instanceCfg.Fingerprint != ""
for _, ep := range instanceCfg.ClusterEndpoints {
if strings.EqualFold(ep.NodeName, node.Node) {
@ -6198,10 +6198,12 @@ func (m *Monitor) pollPVEInstance(ctx context.Context, instanceName string, clie
Str("instance", instanceCfg.Name).
Int("endpointCount", len(instanceCfg.ClusterEndpoints)).
Msg("Skipping temperature collection - node endpoint not found in cluster metadata")
continue
shouldCollect = false
}
}
}
if shouldCollect {
if strings.TrimSpace(sshHost) == "" {
sshHost = node.Node
}
@ -6278,6 +6280,7 @@ func (m *Monitor) pollPVEInstance(ctx context.Context, instanceName string, clie
Msg("Temperature data unavailable after collection")
}
}
}
if m.pollMetrics != nil {
nodeNameLabel := strings.TrimSpace(node.Node)