commit aa108f0a7d3cc2a2a5cfb4f70ab59f9ad7aa8707
Author: Zhi Yan Liu <email address hidden>
Date: Fri Sep 12 20:02:27 2014 +0800
Remove stale chunks when failed to update image to registry
For image v1 api, the operation of uploading image bits to store and
the operation of updating image metadata are separaed, so when the
second operation failed, the image stale chunks will be leaked in store.
This change added a logic to remove those chunks if an exception
happenned during the step of image metadata updating. And if
glance-registry could be reached still, the image status will be changed
to 'killed', this followed standard glance image status transition.
Closes-bug: 1254497
Change-Id: I01e13066b48a8feb1ead0de64992e7997feafdea
Signed-off-by: Zhi Yan Liu <email address hidden>
Reviewed: https:/ /review. openstack. org/121072 /git.openstack. org/cgit/ openstack/ glance/ commit/ ?id=aa108f0a7d3 cc2a2a5cfb4f70a b59f9ad7aa8707
Committed: https:/
Submitter: Jenkins
Branch: master
commit aa108f0a7d3cc2a 2a5cfb4f70ab59f 9ad7aa8707
Author: Zhi Yan Liu <email address hidden>
Date: Fri Sep 12 20:02:27 2014 +0800
Remove stale chunks when failed to update image to registry
For image v1 api, the operation of uploading image bits to store and
the operation of updating image metadata are separaed, so when the
second operation failed, the image stale chunks will be leaked in store.
This change added a logic to remove those chunks if an exception
happenned during the step of image metadata updating. And if
glance-registry could be reached still, the image status will be changed
to 'killed', this followed standard glance image status transition.
Closes-bug: 1254497 eb1ead0de64992e 7997feafdea
Change-Id: I01e13066b48a8f
Signed-off-by: Zhi Yan Liu <email address hidden>