diff options
| author | Kuchinskiy Alexey <kuchinalser@gmail.com> | 2026-06-05 14:55:21 +0300 |
|---|---|---|
| committer | Maksim Malchuk <maksim.malchuk@gmail.com> | 2026-10-16 15:55:17 +0000 |
| commit | 15ce36696a21356eb59abb4473e210f13cf7c98c (patch) | |
| tree | 11d28eb9496e0cc39f583214069e61de29119d58 /ansible | |
| parent | 766e6103418d80d7d34a5b14e340b79513894269 (diff) | |
| download | kolla-ansible-15ce36696a21356eb59abb4473e210f13cf7c98c.tar.gz kolla-ansible-15ce36696a21356eb59abb4473e210f13cf7c98c.zip | |
Fix container unhealthy checks
An issue with skipping "healthy check" checks has been resolved.
In task "Fail if containers are unhealthy" in variable
"unhealthy_containers" not appending services with status
"unhealthy", because path to the status incorrect, and search
in filter "selectattr" not work. Tasks skiping, because in
variable "unhealthy_containers" not items.
Closes-Bug: #2156900
Change-Id: I52f78774536e4487c38a500c2c8941eae4386604
Signed-off-by: Kuchinskiy Alexey <kuchinalser@gmail.com>
(cherry picked from commit d30fad4325b80cc82f485a979c0afeaf7647b07f)
Diffstat (limited to 'ansible')
| -rw-r--r-- | ansible/roles/service-check/tasks/main.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ansible/roles/service-check/tasks/main.yml b/ansible/roles/service-check/tasks/main.yml index 9f4cf30af..9cb17ad09 100644 --- a/ansible/roles/service-check/tasks/main.yml +++ b/ansible/roles/service-check/tasks/main.yml @@ -28,8 +28,8 @@ unhealthy_containers: >- {{ container_facts.containers | dict2items | - selectattr("value.Status", "defined") | - selectattr("value.Status", "search", "unhealthy") | + selectattr("value.State.Health", "defined") | + selectattr("value.State.Health.Status", "search", "unhealthy") | map(attribute='key') | list }} ansible.builtin.fail: msg: > |
