From 4a4b4e7610a04519c00a8279ade8714eba441e6e Mon Sep 17 00:00:00 2001 From: Eugene Rakhmatulin Date: Fri, 30 Jan 2026 16:39:11 -0800 Subject: [PATCH] Fixed a bug when solo mode failed on a standalone Spark without configured RoCE. --- launch-cluster.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/launch-cluster.sh b/launch-cluster.sh index 283d9df..f3e645d 100755 --- a/launch-cluster.sh +++ b/launch-cluster.sh @@ -144,24 +144,22 @@ for i in "${!MOD_PATHS[@]}"; do done # --- Auto-Detection Logic --- - # Source autodiscover module source "$(dirname "$0")/autodiscover.sh" -# Perform auto-detection -detect_interfaces || exit 1 - if [[ "$SOLO_MODE" == "true" ]]; then if [[ -n "$NODES_ARG" ]]; then echo "Error: --solo is incompatible with -n/--nodes." exit 1 fi # Solo mode: skip node detection, just get local IP - detect_local_ip || exit 1 + LOCAL_IP="127.0.0.1" NODES_ARG="$LOCAL_IP" PEER_NODES=() echo "Solo mode enabled. Skipping node detection." else + # Perform auto-detection + detect_interfaces || exit 1 detect_nodes || exit 1 fi @@ -173,8 +171,11 @@ fi # Split nodes into array IFS=',' read -r -a ALL_NODES <<< "$NODES_ARG" -# Detect Head IP (Local IP) -detect_local_ip || exit 1 +if [[ "$SOLO_MODE" != "true" ]]; then + # Detect Head IP (Local IP) + detect_local_ip || exit 1 +fi + HEAD_IP="$LOCAL_IP" # Verify HEAD_IP is in ALL_NODES