Initiate deletion of image files if the import was interrupted
If the image is deleted by appropriate API call while its content
is still being uploaded in import task in v2, 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.
There existed code that safely removes image files if the exception
occurs.
Reviewed: https:/ /review. openstack. org/157067 /git.openstack. org/cgit/ openstack/ glance/ commit/ ?id=a880c8e762e 94b70c1e5d5692a 3defcde734a601
Committed: https:/
Submitter: Jenkins
Branch: stable/juno
commit a880c8e762e94b7 0c1e5d5692a3def cde734a601
Author: Mike Fedosin <email address hidden>
Date: Thu Sep 18 18:07:42 2014 +0400
Initiate deletion of image files if the import was interrupted
If the image is deleted by appropriate API call while its content
is still being uploaded in import task in v2, 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.
There existed code that safely removes image files if the exception
occurs.
SecurityImpact
Conflicts: common/ scripts/ image_import/ main.py
glance/
Closes-Bug: 1371118 7abf4026e7097b9 e76c24135fa 96720365e465cca 7858cfec5c)
Change-Id: I4f7d1aa103f4ce
(cherry picked from commit 7858d4d95154c85