Add some retry to the wget checking from container.

This commit is contained in:
Brendan Burns 2015-01-07 11:22:01 -08:00
parent 512e262dc8
commit eda47206bd

View File

@ -249,7 +249,17 @@ function verify_from_container() {
sudo docker pull busybox >/dev/null;
sudo docker run busybox sh -c '
for i in $(seq -s' ' 1 $4); do
wget -q -T 1 -O - http://$2:$3;
ok=false
for j in $(seq -s' ' 1 10); do
if wget -q -T 1 -O - http://$2:$3; then
ok=true
break
fi
sleep 1
done
if [[ \${ok} == false ]]; then
exit 1
fi
done
'")) \
|| error "testing $1 portal from container failed"