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: apply subnet preference for cluster nodes in fallback path
rcourtmanb7f5cfde1c7a
diff --git a/internal/api/config_handlers.go b/internal/api/config_handlers.goindex 54faf550bf..bebf0c50be 100644--- a/internal/api/config_handlers.go+++ b/internal/api/config_handlers.go@@ -952,6 +952,37 @@ func defaultDetectPVECluster(clientConfig proxmox.ClientConfig, nodeName string,endpoint.IP = clusterNode.IP}+ // Apply subnet preference even in fallback path (refs #929)+ // Node validation may have failed because cluster-reported IPs are on internal+ // network, but we can still query node interfaces via the initial connection+ if connectionIP != nil && clusterNode.IP != "" && clusterNode.Name != "" {+ clusterIP := net.ParseIP(clusterNode.IP)+ if clusterIP != nil && !ipsOnSameNetwork(clusterIP, connectionIP) {+ // Cluster IP is on a different network, try to find one on the same network+ ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)+ nodeInterfaces, err := tempClient.GetNodeNetworkInterfaces(ctx, clusterNode.Name)+ cancel()++ if err == nil {+ preferredIP := findPreferredIP(nodeInterfaces, connectionIP)+ if preferredIP != "" && preferredIP != clusterNode.IP {+ log.Info().+ Str("node", clusterNode.Name).+ Str("cluster_ip", clusterNode.IP).+ Str("preferred_ip", preferredIP).+ Str("connection_ip", connectionIP.String()).+ Msg("Found preferred management IP for unvalidated cluster node")+ endpoint.IPOverride = preferredIP+ }+ } else {+ log.Debug().+ Err(err).+ Str("node", clusterNode.Name).+ Msg("Could not query node network interfaces in fallback path")+ }+ }+ }+clusterEndpoints = append(clusterEndpoints, endpoint)}}