From 932d5afe077a42d558b63706ae925210b2e43703 Mon Sep 17 00:00:00 2001 From: Hui Kang Date: Fri, 8 Jul 2016 20:26:56 +0000 Subject: [PATCH] Check container status after deployment Signed-off-by: Hui Kang --- ci/scale-run.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ci/scale-run.sh b/ci/scale-run.sh index 7891ee7..340acd3 100755 --- a/ci/scale-run.sh +++ b/ci/scale-run.sh @@ -10,6 +10,20 @@ source ovn-scale.conf OVS_REPO=$1 OVS_BRANCH=$2 +function check_container_failure { + sleep 5 + + docker ps -a + failed_containers=$(docker ps -a --format "{{.Names}}" --filter status=exited) + + if [ "$failed_containers" ]; then + for failed in ${failed_containers}; do + docker logs --tail all ${failed} + done + exit 1 + fi +} + # Build the docker containers pushd $OVN_SCALE_TOP cd ansible/docker @@ -31,7 +45,9 @@ fi popd # Verify the containers are running -# TODO(mestery): Actually verify everything is connected +check_container_failure + +# TODO(mestery): Verifying everything is connected $OVNSUDO docker exec ovn-south-database ovn-sbctl show # Create the rally deployment