aboutsummaryrefslogtreecommitdiff
path: root/tests/check-failure.sh
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2021-09-07 09:56:26 +0100
committerMark Goddard <mark@stackhpc.com>2021-10-01 13:08:01 +0100
commit3b22d334d66adec97361fe73193334397a72af20 (patch)
treeb626c1b9dc26182f631e11bf0e41355a6e5fd4e3 /tests/check-failure.sh
parent3e04e0043f187ac9235848f6d177b31a1fa59c05 (diff)
downloadkolla-ansible-3b22d334d66adec97361fe73193334397a72af20.tar.gz
kolla-ansible-3b22d334d66adec97361fe73193334397a72af20.zip
CI: monasca: ignore exited monasca_thresh container
Ignore the monasca_thresh container if it is listed as exited. The container was recently changed to operate as a 'one shot' container, submitting a job to storm then exiting. This does not fit with the usual pattern of Kolla Ansible container usage, but is harmless. Depends-On: https://review.opendev.org/c/openstack/kolla/+/811977 Change-Id: Id40d2260a67ef604255fb1818d41cdcbc73164d7
Diffstat (limited to 'tests/check-failure.sh')
-rwxr-xr-xtests/check-failure.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/check-failure.sh b/tests/check-failure.sh
index fe03c98e3..46b524119 100755
--- a/tests/check-failure.sh
+++ b/tests/check-failure.sh
@@ -23,11 +23,17 @@ check_failure() {
unhealthy_containers=$(sudo docker ps -a --format "{{.Names}}" \
--filter health=unhealthy)
- if [[ -n "$failed_containers" ]]; then
+ if [[ -n "$unhealthy_containers" ]]; then
exit 1;
fi
- if [[ -n "$unhealthy_containers" ]]; then
+ # NOTE(mgoddard): monasca-thresh is a one-shot container that exits but
+ # remains in place, leaving it with a status of exited. This is harmless.
+ if [[ "$failed_containers" = "monasca_thresh" ]]; then
+ exit 0
+ fi
+
+ if [[ -n "$failed_containers" ]]; then
exit 1;
fi
}