Reviewed: https://review.opendev.org/c/openstack/glance/+/923624 Committed: https://opendev.org/openstack/glance/commit/ea131dd1442861cb5884f99b6bb9e47e397605ce Submitter: "Zuul (22348)" Branch: master
commit ea131dd1442861cb5884f99b6bb9e47e397605ce Author: Abhishek Kekane <akek...@redhat.com> Date: Mon Jul 8 09:49:55 2024 +0000 Revert image state to queued if conversion fails Made changes to revert image state to `queued` and deleting image data from staging area if image conversion fails. If image is importing to multiple stores at a time then resetting the image properties `os_glance_importing_to_stores` and `os_glance_failed_imports` to reflect the actual result of the operation. Closes-Bug: 2072483 Change-Id: I373dde3a07332184c43d9605bad7a59c70241a71 ** Changed in: glance Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Glance. https://bugs.launchpad.net/bugs/2072483 Title: Revert image status to queued if image conversion fails Status in Glance: Fix Released Bug description: When glance has enabled import plugin `image_conversion` and if this plugin fails to convert the image to its desired format then image remains in `importing` state forever and also image data remains in staging area unless you delete that image. Ideally image data should be deleted from the staging area and image state should be rolled back to `queued so that user can rectify the error in previous attempt and import image again. Environment settings: Ensure you have glance-direct,web-download method enabled in your glance-api.conf Ensure you have image_conversion plugin enabled in glance-image-import.conf How to reproduce: 1. Create bad image file with below command qemu-img create -f qcow2 -o data_file=abcdefghigh,data_file_raw=on disk.qcow2 1G 2. Use above file to create image using import workflow glance image-create-via-import --disk-format qcow2 --container-format bare --import-method glance-direct --file disk.qcow2 --name test-glance-direct-conversion_1 Expected result: Operation should fail, image should be in queued state and image data should be deleted from staging area Actual result: Operation fails, image remains in importing state and image data remains in staging area To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/2072483/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp