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
This commit is contained in:
Mark Goddard 2021-09-07 09:56:26 +01:00
parent 3e04e0043f
commit 3b22d334d6

View File

@ -23,11 +23,17 @@ check_failure() {
unhealthy_containers=$(sudo docker ps -a --format "{{.Names}}" \ unhealthy_containers=$(sudo docker ps -a --format "{{.Names}}" \
--filter health=unhealthy) --filter health=unhealthy)
if [[ -n "$failed_containers" ]]; then if [[ -n "$unhealthy_containers" ]]; then
exit 1; exit 1;
fi 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; exit 1;
fi fi
} }