From dd9089b26cddea8db958be28cb377492b263d4ba Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sat, 15 Nov 2025 10:07:22 +0000 Subject: [PATCH] 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. --- scripts/install-sensor-proxy.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/install-sensor-proxy.sh b/scripts/install-sensor-proxy.sh index cee599d..7a28aaa 100755 --- a/scripts/install-sensor-proxy.sh +++ b/scripts/install-sensor-proxy.sh @@ -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