To Delete a container that contains children

Asked by Pushkaraj

Hello,
I want to delete a container that contains some objects.But when I tried to delete that container,Swift is not allowing to delete it directly because that container contains some objects.So to delete that container I have to first delete all objects.Then only I can delete that container.Is there any other method to delete container without deleting objects inside that container?

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
Samuel Merritt
Solved:
Last query:
Last reply:
Revision history for this message
Best Samuel Merritt (torgomatic) said :
#1

Nope. Only empty containers can be deleted.

Otherwise, you'd have orphaned objects hanging around consuming space, but without any references to them. It'd be an object leak, and nobody wants that.

Revision history for this message
clayg (clay-gerrard) said :
#2

Well there is bulk request support ya?

common.middleware.bulk

I mean it basically does the same thing, but from the client perspective it may as well be magic... I dunno what version you're running, tho - bulk is pretty new (unreleased?)

https://review.openstack.org/#/c/21454/

Revision history for this message
Pushkaraj (pushkarajs10) said :
#3

Thanks Samuel Merritt, that solved my question.