Cannot delete an empty bucket that has versioning enabled in ONTAP
Applies to
- ONTAP 9
- ONTAP S3 Server
- S3 versioning
Issue
- Cannot delete an empty bucket that has versioning enabled or had versioning enabled earlier after all objects have been deleted:
cluster::> vserver object-store-server bucket show -vserver vs1 -bucket bucket1 -fields versioning-state,object-count vserver bucket versioning-state object-count -------- ------- ---------------- ------------ vs1 bucket1 enabled 0
- Error message states that the bucket cannot be deleted because it is not empty and even with skip bucket empty check set to true the command fails.
cluster::> vserver object-store-server bucket delete -vserver vs1 -bucket bucket1
Error: command failed: Failed to remove bucket "bucket1" for Vserver "vs1".
Reason: Cannot delete bucket "bucket1" on Vserver "vs1" because it is
not empty. Delete the objects, and then try the operation again. For
further assistance, contact technical support.
clus::*> vserver object-store-server bucket delete -vserver S3 -bucket buck1 -skip-bucket-empty-check true
Error: command failed: Failed to remove bucket "buck1" for Vserver "S3". Reason: Cannot delete bucket "buck1" on Vserver
"S3" because it is not empty. Delete the objects, and then try the operation again. For further assistance, contact technical
support.
clus::*>
