Parallelise sanity checks in order to speed them up.
This commit is contained in:
1 parent
7328c3fe86
commit
04cc4edf26
1 file changed
+30
-11
+30
-11
@@ -5,23 +5,42 @@
|
||||
set -e
|
||||
|
||||
whitely echo Ping each host from the other
|
||||
|
||||
for host in $HOSTS; do
|
||||
for other in $HOSTS; do
|
||||
[ $host = $other ] || run_on $host $PING $other
|
||||
if [ "$host" != "$other" ]; then
|
||||
run_on $host $PING $other &
|
||||
pids="$pids $!"
|
||||
fi
|
||||
done
|
||||
done
|
||||
for pid in $pids; do wait $pid; done
|
||||
unset pids
|
||||
|
||||
|
||||
whitely echo Check we can reach docker
|
||||
|
||||
function check_docker() {
|
||||
docker_version=$(docker_on $1 version)
|
||||
docker_info=$(docker_on $1 info)
|
||||
docker_weave_version=$(docker_on $1 inspect -f {{.Created}} weaveworks/weave:${WEAVE_VERSION:-latest})
|
||||
weave_version=$(weave_on $1 version)
|
||||
cat << EOF
|
||||
|
||||
Host Version Info: $1
|
||||
=====================================
|
||||
# docker version
|
||||
$docker_version
|
||||
# docker info
|
||||
$docker_info
|
||||
# weave version
|
||||
$docker_weave_version
|
||||
$weave_version
|
||||
EOF
|
||||
}
|
||||
|
||||
for host in $HOSTS; do
|
||||
echo
|
||||
echo Host Version Info: $host
|
||||
echo =====================================
|
||||
echo "# docker version"
|
||||
docker_on $host version
|
||||
echo "# docker info"
|
||||
docker_on $host info
|
||||
echo "# weave version"
|
||||
docker_on $host inspect -f {{.Created}} weaveworks/weave:${WEAVE_VERSION:-latest}
|
||||
weave_on $host version
|
||||
check_docker $host &
|
||||
pids="$pids $!"
|
||||
done
|
||||
for pid in $pids; do wait $pid; done
|
||||
Reference in new issue
Block a user