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.
This commit is contained in:
parent
5b7d1726d7
commit
fbfd086724
1 changed files with 9 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue