Image Import creates taskflow for impossible import scenarios

Bug #1758943 reported by Erno Kuvaja
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Erno Kuvaja
Queens
Fix Released
High
Erno Kuvaja
Rocky
Fix Released
High
Erno Kuvaja

Bug Description

When the image_import call is made the taskflow is created and responsible handling the rest of the request. It does not do any prechecks if the import conditions are met (like verifying that the image status transition would be possible. This will create lots of tasks that will end up to the database with no apparent reason.

We should make at least basic status checks (like if "glance-direct" method was called agains non "uploading" status or "web-download" method used against non "queued" image) before creating the taskflow.

Erno Kuvaja (jokke)
Changed in glance:
importance: Undecided → High
summary: - Image Import greates taskflow for impossible import scenarios
+ Image Import creates taskflow for impossible import scenarios
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/557712
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=0376185fb34a8cba3d8d705e579e08cddfb9316d
Submitter: Zuul
Branch: master

commit 0376185fb34a8cba3d8d705e579e08cddfb9316d
Author: Erno Kuvaja <email address hidden>
Date: Wed Mar 28 19:49:48 2018 +0100

    Prevent taskflow creation in impossible import

    This change prevents taskflow creation during image import in cases
    we know for sure that the image activation won't be successful.

    The change follows the Glance principles of failing early and tries
    to provide as meaningful error messages to the end user as possible.

    Co-authored-by: Abhishek Kekane <email address hidden>
    Closes-bug: 1758943
    Change-Id: Iaee2781d07f4c0afd4f886f0b30b523bd47f1058

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

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/580614

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

Reviewed: https://review.openstack.org/580614
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=f67696177643b448f9e7e918cd72841f43dacfcd
Submitter: Zuul
Branch: stable/queens

commit f67696177643b448f9e7e918cd72841f43dacfcd
Author: Erno Kuvaja <email address hidden>
Date: Wed Mar 28 19:49:48 2018 +0100

    Prevent taskflow creation in impossible import

    This change prevents taskflow creation during image import in cases
    we know for sure that the image activation won't be successful.

    The change follows the Glance principles of failing early and tries
    to provide as meaningful error messages to the end user as possible.

    Co-authored-by: Abhishek Kekane <email address hidden>
    Closes-bug: 1758943
    Change-Id: Iaee2781d07f4c0afd4f886f0b30b523bd47f1058
    (cherry picked from commit 0376185fb34a8cba3d8d705e579e08cddfb9316d)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 17.0.0.0b3

This issue was fixed in the openstack/glance 17.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance queens-eol

This issue was fixed in the openstack/glance queens-eol 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.