mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-25 15:41:04 +02:00
fix(test_ami): Update timeouts to what we've actually been using
This commit is contained in:
parent
02edace9da
commit
6097c50ccf
@ -104,7 +104,7 @@ declare -a ips=($($ec2_cmd | grep INSTANCE | cut -f4))
|
|||||||
# sleep until all the sockets we need come up
|
# sleep until all the sockets we need come up
|
||||||
for host in ${ips[@]}; do
|
for host in ${ips[@]}; do
|
||||||
for port in 22 4001 7001; do
|
for port in 22 4001 7001; do
|
||||||
timeout 90 perl -MIO::Socket::INET -e "
|
timeout 120 perl -MIO::Socket::INET -e "
|
||||||
until(new IO::Socket::INET('$host:$port')){sleep 1}"
|
until(new IO::Socket::INET('$host:$port')){sleep 1}"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
@ -113,9 +113,9 @@ echo "OK ($instances)"
|
|||||||
echo -n "Testing etcd... "
|
echo -n "Testing etcd... "
|
||||||
test_key="v1/keys/test"
|
test_key="v1/keys/test"
|
||||||
# XXX: the sleep *should never* be required, this is a bug in etcd
|
# XXX: the sleep *should never* be required, this is a bug in etcd
|
||||||
sleep 1
|
sleep 5
|
||||||
curl --fail -s -L "${ips[0]}:4001/$test_key" -d value="$token" > /dev/null
|
curl --fail -s -L "${ips[0]}:4001/$test_key" -d value="$token" > /dev/null
|
||||||
sleep 1
|
sleep 5
|
||||||
for host in ${ips[@]}; do
|
for host in ${ips[@]}; do
|
||||||
if ! curl --fail -s -L "${host}:4001/$test_key" | grep -q $token; then
|
if ! curl --fail -s -L "${host}:4001/$test_key" | grep -q $token; then
|
||||||
echo "etcd bootstrap appears to have failed for $host" >&2
|
echo "etcd bootstrap appears to have failed for $host" >&2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user