Skip to content

Commit

Permalink
Change awk regex command to capture the coordinate address properly
Browse files Browse the repository at this point in the history
  • Loading branch information
michelle-yooh committed Dec 3, 2024
1 parent 27f8a81 commit 5b66e22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gpu_multi_process_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ resolve_coordinator_ip() {
echo "Coordinator Address $JAX_COORDINATOR_ADDRESS"

while [[ "$coordinator_found" = false && $lookup_attempt -le $max_coordinator_lookups ]]; do
coordinator_ip_address=$(nslookup "$JAX_COORDINATOR_ADDRESS" 2>/dev/null | awk '/^Address: / { print $2 }' | head -n 1)
echo $(nslookup "$JAX_COORDINATOR_ADDRESS" 2>/dev/null | awk '/Address: / { print $2 }')
coordinator_ip_address=$(nslookup "$JAX_COORDINATOR_ADDRESS" 2>/dev/null | awk '/Address: / { print $2 }' | head -n 1)
if [[ -n "$coordinator_ip_address" ]]; then
coordinator_found=true
echo "Coordinator IP address: $coordinator_ip_address"
Expand Down

0 comments on commit 5b66e22

Please sign in to comment.