Add timeout to prevent a stuck ssh
This commit is contained in:
@ -207,7 +207,7 @@ EOF
|
|||||||
echo "Waiting for $name to finish booting..."
|
echo "Waiting for $name to finish booting..."
|
||||||
(
|
(
|
||||||
for i in $(seq 1 30); do
|
for i in $(seq 1 30); do
|
||||||
if (set -x; ssh "${sshOptions[@]}" "$publicIp" "test -f /.instance-startup-complete"); then
|
if (set -x; timeout 20s ssh "${sshOptions[@]}" "$publicIp" "test -f /.instance-startup-complete"); then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
sleep 2
|
sleep 2
|
||||||
|
Reference in New Issue
Block a user