Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions build-system/scripts/request_spot
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ done

# Wait till ssh port is open.
>&2 echo "Waiting for SSH at $IP..."
for I in {1..60}; do
if nc -z $IP 22; then
echo $IP
exit 0
SECONDS=0
while ! nc -z -w1 $IP 22; do
if (( SECONDS >= 60 )); then
>&2 echo "Timeout: SSH port 22 at $IP did not become available after 60 seconds."
exit 1
fi
sleep 1
done
exit 1
echo $IP