From 78c2228b89034ccc79c34ea5f1e9a07ef8a7ca06 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sun, 19 Oct 2025 08:48:25 +0000 Subject: [PATCH] fix: add HostName entries for cluster nodes in SSH config Added logic to resolve IP addresses for cluster nodes and include them as HostName entries in the SSH config. Without this, Pulse couldn't connect to cluster nodes like 'minipc' because the container couldn't resolve the hostname. Uses getent to resolve node names to IPs, with fallback to hostname if resolution fails (for environments where DNS works). --- internal/api/config_handlers.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/api/config_handlers.go b/internal/api/config_handlers.go index 0d45e65..7c56c48 100644 --- a/internal/api/config_handlers.go +++ b/internal/api/config_handlers.go @@ -3953,8 +3953,15 @@ elif [ "$TEMP_MONITORING_AVAILABLE" = true ]; then # Add ProxyJump config for each cluster node for NODE in $ALL_NODES; do if [ "$NODE" != "$PROXY_JUMP_HOST" ]; then + # Resolve node IP address (try getent, fallback to just the hostname) + NODE_IP=$(getent hosts "$NODE" 2>/dev/null | awk '{print $1}' | head -1) + if [ -z "$NODE_IP" ]; then + NODE_IP="$NODE" # Fallback to hostname if resolution fails + fi + SSH_CONFIG="${SSH_CONFIG} Host ${NODE} + HostName ${NODE_IP} ProxyJump ${PROXY_JUMP_HOST} User root IdentityFile ~/.ssh/id_ed25519