Better error on deleting non-empty Swift container
Swift client method delete_container() does not allow to delete
non-empty containers, in which case user gets a confusing 409 error
exessively truncated by Swift with no actual reason information.
This patch catches 409 errors from Swift client on container delete,
checks for objects in the container and raises a suitable error if
container is not empty, so that the DELETE_FAILED reason is clearly
seen.
Reviewed: https:/ /review. openstack. org/144317 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=ae0ccc4b51d 3f6755e53c67f2e 7895f3713b56dc
Committed: https:/
Submitter: Jenkins
Branch: master
commit ae0ccc4b51d3f67 55e53c67f2e7895 f3713b56dc
Author: Pavlo Shchelokovskyy <email address hidden>
Date: Mon Dec 29 15:37:41 2014 +0000
Better error on deleting non-empty Swift container
Swift client method delete_container() does not allow to delete
non-empty containers, in which case user gets a confusing 409 error
exessively truncated by Swift with no actual reason information.
This patch catches 409 errors from Swift client on container delete,
checks for objects in the container and raises a suitable error if
container is not empty, so that the DELETE_FAILED reason is clearly
seen.
Change-Id: Ibca3851d11b509 413b739a693b1dd d244479d37b
Closes-Bug: #1406263