Octavia Image is uplaoaded more than once

Bug #1967270 reported by Sven Anders
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Unassigned

Bug Description

When we run the octavia role. It created more than one image called: amphora-x64-haproxy

in openstack-ansible-os_octavia/tasks/octavia_amp_image.yml there is block

```
     - name: Delete old image from glance
          openstack.cloud.image:
            auth:
              auth_url: "{{ keystone_service_adminurl }}"
              username: "{{ octavia_service_user_name }}"
              password: "{{ octavia_service_password }}"
              project_name: "{{ octavia_service_project_name }}"
              user_domain_name: "{{ octavia_service_user_domain_id }}"
              project_domain_name: "{{ octavia_service_project_domain_id }}"
            state: absent
            region_name: "{{ octavia_service_region }}"
            name: "{{ get_image_info.openstack_image.id }}"
            interface: admin
            verify: "{{ not keystone_service_adminuri_insecure }}"
          register: remove_old_image
          until: remove_old_image is success
          retries: 5
          delay: 10
          when:
            - openstack_image.id is defined
```

I think the when should look like this:

```
when:
- get_image_info.openstack_image.id is defined
```
because otherwise it is always false.
```

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_octavia (master)
Changed in openstack-ansible:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_octavia (master)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_octavia/+/842145
Committed: https://opendev.org/openstack/openstack-ansible-os_octavia/commit/9d999d0bae5c58263b4906a1e9897c763a0071b8
Submitter: "Zuul (22348)"
Branch: master

commit 9d999d0bae5c58263b4906a1e9897c763a0071b8
Author: Jonathan Rosser <email address hidden>
Date: Tue May 17 16:49:09 2022 +0100

    Fix condition for deleting old amp images

    Change-Id: Ic5c9b809f90dae415ccc72233342ea3242c0b78f
    Closes-Bug: 1967270

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_octavia (stable/xena)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_octavia (stable/wallaby)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_octavia (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_octavia/+/842935
Committed: https://opendev.org/openstack/openstack-ansible-os_octavia/commit/c2938f5773e04da501717031db11985536e59f5e
Submitter: "Zuul (22348)"
Branch: stable/xena

commit c2938f5773e04da501717031db11985536e59f5e
Author: Jonathan Rosser <email address hidden>
Date: Tue May 17 16:49:09 2022 +0100

    Fix condition for deleting old amp images

    Change-Id: Ic5c9b809f90dae415ccc72233342ea3242c0b78f
    Closes-Bug: 1967270
    (cherry picked from commit 9d999d0bae5c58263b4906a1e9897c763a0071b8)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_octavia (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_octavia/+/842936
Committed: https://opendev.org/openstack/openstack-ansible-os_octavia/commit/4a6e1fdbfe707e705d4967dcc6bd67449444c694
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 4a6e1fdbfe707e705d4967dcc6bd67449444c694
Author: Jonathan Rosser <email address hidden>
Date: Tue May 17 16:49:09 2022 +0100

    Fix condition for deleting old amp images

    Change-Id: Ic5c9b809f90dae415ccc72233342ea3242c0b78f
    Closes-Bug: 1967270
    (cherry picked from commit 9d999d0bae5c58263b4906a1e9897c763a0071b8)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_octavia yoga-eom

This issue was fixed in the openstack/openstack-ansible-os_octavia yoga-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_octavia wallaby-eom

This issue was fixed in the openstack/openstack-ansible-os_octavia wallaby-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_octavia xena-eom

This issue was fixed in the openstack/openstack-ansible-os_octavia xena-eom release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.