Work around AWS boot check weirdness

This commit is contained in:
Michael Vines 2018-11-07 15:11:47 -08:00
parent 3b41eec199
commit 82f914e0dc
No known key found for this signature in database
GPG Key ID: 33F4FDEC4E0E88BD
1 changed files with 4 additions and 2 deletions

View File

@ -236,9 +236,11 @@ EOF
echo "Waiting for $name to finish booting..."
(
set -x
set -x +e
for i in $(seq 1 60); do
if timeout 20s ssh "${sshOptions[@]}" "$publicIp" "test -f /.instance-startup-complete"; then
timeout 20s ssh "${sshOptions[@]}" "$publicIp" "ls -l /.instance-startup-complete"
ret=$?
if [[ $ret -eq 0 ]]; then
exit 0
fi
sleep 2