Fix installer adding invalid hostname entries to allowed_nodes
The installer was adding node hostnames (and accidentally the header "Name") to allowed_nodes in addition to IPs. This caused: 1. Invalid entries like "Name", "minipc", "delly" in config 2. These are not valid for SSH temperature collection Only IPs should be in allowed_nodes since that's what the proxy uses for SSH. Removed the loop that added CLUSTER_NODE_NAMES to the array. Also fixed: Removed extraction of CLUSTER_NODE_NAMES since it's no longer used.
This commit is contained in:
parent
f64344d1da
commit
dd9089b26c
1 changed files with 1 additions and 7 deletions
|
|
@ -2076,9 +2076,6 @@ if command -v pvecm >/dev/null 2>&1; then
|
|||
# Extract node IPs from pvecm status
|
||||
CLUSTER_NODES=$(pvecm status 2>/dev/null | awk '/0x[0-9a-f]+.*[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/ {print $3}' || true)
|
||||
|
||||
# Extract node names from pvecm nodes (for allowlist)
|
||||
CLUSTER_NODE_NAMES=$(pvecm nodes 2>/dev/null | awk 'NR>2 {print $3}' || true)
|
||||
|
||||
if [[ -n "$CLUSTER_NODES" ]]; then
|
||||
print_info "Discovered cluster nodes: $(echo $CLUSTER_NODES | tr '\n' ' ')"
|
||||
|
||||
|
|
@ -2166,14 +2163,11 @@ if command -v pvecm >/dev/null 2>&1; then
|
|||
|
||||
# Add discovered cluster nodes to config file for allowlist validation
|
||||
print_info "Updating proxy configuration with discovered cluster nodes..."
|
||||
# Collect all nodes (IPs and hostnames) into array
|
||||
# Collect only IPs (hostnames are not used for SSH temperature collection)
|
||||
all_nodes=()
|
||||
for node_ip in $CLUSTER_NODES; do
|
||||
all_nodes+=("$node_ip")
|
||||
done
|
||||
for node_name in $CLUSTER_NODE_NAMES; do
|
||||
all_nodes+=("$node_name")
|
||||
done
|
||||
# Use helper function to safely update allowed_nodes (prevents duplicates on re-run)
|
||||
update_allowed_nodes "Cluster nodes (auto-discovered during installation)" "${all_nodes[@]}"
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue