Public bug reported: When I create a new task in v2 to upload an image, it creates the image record in db, sets status to "saving" and then begins the uploading.
If the image is deleted by appropriate API call while its content is still being uploaded, an exception is raised and it is not handled in the API code. This leads to the fact that the uploaded image file stays in a storage and clogs it. File "/opt/stack/glance/glance/common/scripts/image_import/main.py", line 62, in _execute uri) File "/opt/stack/glance/glance/common/scripts/image_import/main.py", line 95, in import_image new_image = image_repo.get(image_id) File "/opt/stack/glance/glance/api/authorization.py", line 106, in get image = self.image_repo.get(image_id) File "/opt/stack/glance/glance/domain/proxy.py", line 86, in get return self.helper.proxy(self.base.get(item_id)) File "/opt/stack/glance/glance/api/policy.py", line 179, in get return super(ImageRepoProxy, self).get(image_id) File "/opt/stack/glance/glance/domain/proxy.py", line 86, in get return self.helper.proxy(self.base.get(item_id)) File "/opt/stack/glance/glance/domain/proxy.py", line 86, in get return self.helper.proxy(self.base.get(item_id)) File "/opt/stack/glance/glance/domain/proxy.py", line 86, in get return self.helper.proxy(self.base.get(item_id)) File "/opt/stack/glance/glance/db/__init__.py", line 72, in get raise exception.NotFound(msg) NotFound: No image found with ID e2285448-a56f-45b1-9e6e-216d2b304967 This bug is very similar to https://bugs.launchpad.net/glance/+bug/1188532, but it relates to task mechanism in v2. ** Affects: glance Importance: Undecided Assignee: Mike Fedosin (mfedosin) Status: New ** Changed in: glance Assignee: (unassigned) => Mike Fedosin (mfedosin) -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Glance. https://bugs.launchpad.net/bugs/1371118 Title: Image file stays in store if image has been deleted during upload Status in OpenStack Image Registry and Delivery Service (Glance): New Bug description: When I create a new task in v2 to upload an image, it creates the image record in db, sets status to "saving" and then begins the uploading. If the image is deleted by appropriate API call while its content is still being uploaded, an exception is raised and it is not handled in the API code. This leads to the fact that the uploaded image file stays in a storage and clogs it. File "/opt/stack/glance/glance/common/scripts/image_import/main.py", line 62, in _execute uri) File "/opt/stack/glance/glance/common/scripts/image_import/main.py", line 95, in import_image new_image = image_repo.get(image_id) File "/opt/stack/glance/glance/api/authorization.py", line 106, in get image = self.image_repo.get(image_id) File "/opt/stack/glance/glance/domain/proxy.py", line 86, in get return self.helper.proxy(self.base.get(item_id)) File "/opt/stack/glance/glance/api/policy.py", line 179, in get return super(ImageRepoProxy, self).get(image_id) File "/opt/stack/glance/glance/domain/proxy.py", line 86, in get return self.helper.proxy(self.base.get(item_id)) File "/opt/stack/glance/glance/domain/proxy.py", line 86, in get return self.helper.proxy(self.base.get(item_id)) File "/opt/stack/glance/glance/domain/proxy.py", line 86, in get return self.helper.proxy(self.base.get(item_id)) File "/opt/stack/glance/glance/db/__init__.py", line 72, in get raise exception.NotFound(msg) NotFound: No image found with ID e2285448-a56f-45b1-9e6e-216d2b304967 This bug is very similar to https://bugs.launchpad.net/glance/+bug/1188532, but it relates to task mechanism in v2. To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1371118/+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