From 5886b920bac920f8bf774f0690ffc1462420e1d6 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Fri, 17 Oct 2025 19:09:54 +0000 Subject: [PATCH] fix: improve sensor proxy install script reliability Fixes two issues with the sensor proxy installation: 1. Local node IP detection now uses exact matching instead of substring matching to avoid false negatives 2. Removes duplicate output filtering in the setup script wrapper These changes ensure that the proxy SSH key is correctly configured on the local node during cluster installations. --- internal/api/config_handlers.go | 4 ---- scripts/install-sensor-proxy.sh | 10 +++++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/api/config_handlers.go b/internal/api/config_handlers.go index 9131eb8..a1ec8c0 100644 --- a/internal/api/config_handlers.go +++ b/internal/api/config_handlers.go @@ -3732,10 +3732,6 @@ if [ "$PULSE_IS_CONTAINERIZED" = true ] && [ -n "$PULSE_CTID" ]; then echo "$INSTALL_OUTPUT" | grep -E "✓|⚠️|ERROR" || true fi - if [ -n "$INSTALL_OUTPUT" ]; then - echo "$INSTALL_OUTPUT" | grep -E "✓|⚠️|ERROR" || true - fi - if [ $INSTALL_STATUS -eq 0 ]; then # Verify proxy health PROXY_HEALTHY=false diff --git a/scripts/install-sensor-proxy.sh b/scripts/install-sensor-proxy.sh index 8716d65..ed8cb04 100755 --- a/scripts/install-sensor-proxy.sh +++ b/scripts/install-sensor-proxy.sh @@ -351,9 +351,13 @@ if command -v pvecm >/dev/null 2>&1; then print_info "Authorizing proxy key on node $node_ip..." IS_LOCAL=false - if [[ " $LOCAL_IPS " == *" $node_ip "* ]]; then - IS_LOCAL=true - fi + # Check if node_ip matches any of the local IPs (exact match with word boundaries) + for local_ip in $LOCAL_IPS; do + if [[ "$node_ip" == "$local_ip" ]]; then + IS_LOCAL=true + break + fi + done if [[ " $LOCAL_HOSTNAMES " == *" $node_ip "* ]]; then IS_LOCAL=true fi