Handle glance exception during rotating instance backup
Glance image backends may return HTTPConflict in many cases
during deleting image, for example, an rbd image is used for
booting a new instance, or rbd image has snapshot(s).
If user have already backed up instance to few numbers and then
execute backup api with rotation 1, then nova will delete the
previously created images exceeding rotation limit.
During deleting these images, if the first one of the backup
images are deleted failed with HTTPConflict or other exceptions,
all images exceeding rotation limit will be left over.
This patch handles ImageDeleteConflict and all other exceptions
during deleting backup images, logs a message and continues
deleting all of the remaining images.
Reviewed: https:/ /review. openstack. org/523395 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=3e766e5bd42 9c6119c077b8be0 2360ae1e1ec8bd
Committed: https:/
Submitter: Zuul
Branch: master
commit 3e766e5bd429c61 19c077b8be02360 ae1e1ec8bd
Author: Wangpan <email address hidden>
Date: Tue Nov 28 19:48:21 2017 +0800
Handle glance exception during rotating instance backup
Glance image backends may return HTTPConflict in many cases
during deleting image, for example, an rbd image is used for
booting a new instance, or rbd image has snapshot(s).
If user have already backed up instance to few numbers and then
execute backup api with rotation 1, then nova will delete the
previously created images exceeding rotation limit.
During deleting these images, if the first one of the backup
images are deleted failed with HTTPConflict or other exceptions,
all images exceeding rotation limit will be left over.
This patch handles ImageDeleteConflict and all other exceptions
during deleting backup images, logs a message and continues
deleting all of the remaining images.
Closes-Bug: #1734838
Change-Id: Ie8091fe3e0e427 5717ddc50166345 f1c9df4b889