From fbfd0867243daf9eaa05c624156c56fcc27c4528 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sat, 15 Nov 2025 08:37:44 +0000 Subject: [PATCH] Fix missed /usr/local path migration and add backward compatibility **Missed Migration**: - Line 2204 still used /usr/local/bin/pulse-sensor-wrapper.sh in fallback path - Updated to use /opt/pulse/sensor-proxy/bin/pulse-sensor-wrapper.sh **Backward Compatibility**: - When pushing SSH keys to cluster nodes, installer now checks if remote node has old installation (/usr/local/bin wrapper exists but /opt path doesn't) - Automatically creates symlink on remote nodes to maintain compatibility - Prevents temperature collection failures when cluster has mixed old/new installs **Root Cause**: When installer runs on upgraded node (delly), it pushes SSH keys with new forced command path to all cluster nodes. If remote node (minipc) has old installation, the forced command fails because wrapper doesn't exist at new path. This fix ensures "it works straight out the box" by bridging old and new paths automatically during SSH key deployment. --- scripts/install-sensor-proxy.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/install-sensor-proxy.sh b/scripts/install-sensor-proxy.sh index b00b7fe..bd19b0a 100755 --- a/scripts/install-sensor-proxy.sh +++ b/scripts/install-sensor-proxy.sh @@ -2125,6 +2125,14 @@ if command -v pvecm >/dev/null 2>&1; then ssh -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=5 root@"$node_ip" \ "sed -i '/# pulse-managed-key\$/d' /root/.ssh/authorized_keys" 2>/dev/null || true + # Ensure wrapper compatibility on remote node (supports old installations) + # Create symlink if old wrapper exists but new path doesn't + ssh -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=5 root@"$node_ip" \ + "if [[ -f /usr/local/bin/pulse-sensor-wrapper.sh && ! -f /opt/pulse/sensor-proxy/bin/pulse-sensor-wrapper.sh ]]; then \ + mkdir -p /opt/pulse/sensor-proxy/bin && \ + ln -sf /usr/local/bin/pulse-sensor-wrapper.sh /opt/pulse/sensor-proxy/bin/pulse-sensor-wrapper.sh; \ + fi" 2>/dev/null || true + # Add new key with forced command SSH_ERROR=$(ssh -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=5 root@"$node_ip" \ "echo '${AUTH_LINE}' >> /root/.ssh/authorized_keys" 2>&1) @@ -2201,7 +2209,7 @@ else print_info "Configuring SSH key for localhost..." # Configure localhost as fallback - FORCED_CMD='command="/usr/local/bin/pulse-sensor-wrapper.sh",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty' + FORCED_CMD='command="/opt/pulse/sensor-proxy/bin/pulse-sensor-wrapper.sh",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty' AUTH_LINE="${FORCED_CMD} ${PROXY_PUBLIC_KEY} # pulse-managed-key" configure_local_authorized_key "$AUTH_LINE"