diff options
| author | Alex Welsh <alex@stackhpc.com> | 2026-09-01 14:19:17 +0100 |
|---|---|---|
| committer | Alex Welsh <alex@stackhpc.com> | 2026-09-03 10:37:04 +0000 |
| commit | a3badc9325e53d875b30f3b89947e7e2e2863781 (patch) | |
| tree | 3b514f9d57c9cd5d85a53d019fccf2a78bbba097 /releasenotes/notes | |
| parent | 0848902bef126de880448977307fe7d6bcc9a5d4 (diff) | |
| download | kolla-ansible-a3badc9325e53d875b30f3b89947e7e2e2863781.tar.gz kolla-ansible-a3badc9325e53d875b30f3b89947e7e2e2863781.zip | |
Fix compare_labels when image doesn't exist
check_image() from kolla_docker_worker returns None when the image
doesn't exist locally. This means that when compare_labels tries to read
a value from it, it will error out. This chain happens when comparing an
image that doesn't exist locally. In the past we didn't hit this because
checks ran sequentially and it would exit before hitting this. A recent
change [1] means that now all checks run always.
This patch fixes the issue in two ways. First, it makes the docker
worker return an empty dict from check_image when it doesn't exist.
Second, compare_labels now truthy-checks the output before proceeding,
and returns straight away if it's False.
[1] https://review.opendev.org/c/openstack/kolla-ansible/+/978162
Change-Id: I3c33ac3a474f80bca100005f61c1c0bfedc46170
Signed-off-by: Alex Welsh <alex@stackhpc.com>
Closes-Bug: #2166024
(cherry picked from commit ffc50e8d33ade7a0d58ef83b79ed296a28b49608)
Diffstat (limited to 'releasenotes/notes')
| -rw-r--r-- | releasenotes/notes/bug-1889611-a89ddb10134081f4.yaml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/releasenotes/notes/bug-1889611-a89ddb10134081f4.yaml b/releasenotes/notes/bug-1889611-a89ddb10134081f4.yaml new file mode 100644 index 000000000..05cce09d8 --- /dev/null +++ b/releasenotes/notes/bug-1889611-a89ddb10134081f4.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixes image check with containers that don't exist locally. A bug in the + image comparison logic would make service-check-containers fail with + ``AttributeError: NoneType object has no attribute get`` + `LP#2166024 <https://launchpad.net/bugs/2166024>`__ |
