Image import might result 'active' image with no data.

Bug #1889640 reported by Erno Kuvaja
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Critical
Erno Kuvaja
Ussuri
Fix Committed
Critical
Erno Kuvaja
Victoria
Fix Released
Critical
Erno Kuvaja

Bug Description

There is two scenarios where Interoperable Image Import might result 'Active' image without image data in it.

1) If the data from staging was deleted by the time task tries to delete it.
    * In This scenario the taskflow will hit revert chain, delete the image from the stores it had just uploaded, but will not revert the set_image_data() changing the image to active.

2) If the 'all_stores_must_succeed' was set to 'false' and all uploads fails.
    * As we ignore the individual store failures in this scenario the taskflow will finish and when it gets to _SaveImage it will finally set the image active even we have no locations.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.opendev.org/744010

Changed in glance:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/744011

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.opendev.org/744010
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=e8b13ce1b44313a9604aa9cd8cdbf8bd4d1bda52
Submitter: Zuul
Branch: master

commit e8b13ce1b44313a9604aa9cd8cdbf8bd4d1bda52
Author: Erno Kuvaja <email address hidden>
Date: Thu Jul 30 17:00:23 2020 +0100

    Fix active image when all uploads fail

    This fix is for the case where all stores fails and
    the end result is active image with no image data.

    Change-Id: Ie7558eeae488406a1696f0ee1bf40b644ae6d8cc
    Partial-Bug: #1889640

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/744997

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.opendev.org/744011
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=b985e44f795340edfceed3b46abf9b4b28907cbb
Submitter: Zuul
Branch: master

commit b985e44f795340edfceed3b46abf9b4b28907cbb
Author: Erno Kuvaja <email address hidden>
Date: Thu Jul 30 17:20:36 2020 +0100

    Fix active image without data

    Fixes image import resulting active image without any data
    when the image happens to be deleted from staging before
    _DeleteFromFS task is ran which is supposed to cleanup.

    Change-Id: I6256a25d1907ec15fbdde560fc8eae37f3067213
    Closes-Bug: #1889640

Changed in glance:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/745100

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/ussuri)

Reviewed: https://review.opendev.org/745100
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=2b3ce07c32624f9987df87520c5ff8d538c8e5fd
Submitter: Zuul
Branch: stable/ussuri

commit 2b3ce07c32624f9987df87520c5ff8d538c8e5fd
Author: Erno Kuvaja <email address hidden>
Date: Thu Jul 30 17:20:36 2020 +0100

    Fix active image without data

    Fixes image import resulting active image without any data
    when the image happens to be deleted from staging before
    _DeleteFromFS task is ran which is supposed to cleanup.

    Conflict: Correct import order used in test.
    Change-Id: I6256a25d1907ec15fbdde560fc8eae37f3067213
    Closes-Bug: #1889640
    (cherry picked from commit b985e44f795340edfceed3b46abf9b4b28907cbb)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.opendev.org/744997
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=d63d72799766801414500934e06db8c88807fe59
Submitter: Zuul
Branch: stable/ussuri

commit d63d72799766801414500934e06db8c88807fe59
Author: Erno Kuvaja <email address hidden>
Date: Thu Jul 30 17:00:23 2020 +0100

    Fix active image when all uploads fail

    This fix is for the case where all stores fails and
    the end result is active image with no image data.

    Conflicts: Action wrapper does not exists, utilized image_repo
               instead.
    Change-Id: Ie7558eeae488406a1696f0ee1bf40b644ae6d8cc
    Partial-Bug: #1889640
    (cherry picked from commit e8b13ce1b44313a9604aa9cd8cdbf8bd4d1bda52)

tags: added: in-stable-ussuri
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.