mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-20 10:18:25 +00:00
fix: ensure cluster endpoints include port number (addresses #428)
When detecting Proxmox cluster nodes, the Host field was being set to just the node name without a port. This caused validation to fail with "invalid Port number" error when qdevices were running. Now cluster endpoints properly include the port (8006) in the Host field, allowing clusters with qdevices to be added successfully.
This commit is contained in:
@@ -289,10 +289,21 @@ func detectPVECluster(clientConfig proxmox.ClientConfig, nodeName string) (isClu
|
||||
continue
|
||||
}
|
||||
|
||||
// Build the host URL with proper port
|
||||
// Prefer IP if available, otherwise use node name
|
||||
nodeHost := clusterNode.IP
|
||||
if nodeHost == "" {
|
||||
nodeHost = clusterNode.Name
|
||||
}
|
||||
// Ensure host has port (PVE uses 8006)
|
||||
if !strings.Contains(nodeHost, ":") {
|
||||
nodeHost = nodeHost + ":8006"
|
||||
}
|
||||
|
||||
endpoint := config.ClusterEndpoint{
|
||||
NodeID: clusterNode.ID,
|
||||
NodeName: clusterNode.Name,
|
||||
Host: clusterNode.Name,
|
||||
Host: nodeHost,
|
||||
Online: clusterNode.Online == 1,
|
||||
LastSeen: time.Now(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user