@@ -78,3 +78,117 @@ aws s3api abort-multipart-upload --bucket BUCKET_NAME --key KEY --upload-id UPLO
7878```
7979
8080With ceph-based object storage you may configure a bucket lifecycle rule ` AbortIncompleteMultipartUpload ` to let unfinished multipart uploads be cleaned up automatically after a certain number of days.
81+
82+ ### s3 DeleteBucketLifecycle does not delete lifecycle config
83+
84+ ** Problem Statement:**
85+ There is an issue where the s3 DeleteBucketLifecycle which API call fails to actually remove the lifecycle configuration from the bucket. The fix was originally implemented in master but was not included in the squid release line.
86+ [ Ceph tracker link] ( https://github.com/ceph/ceph/pull/64741 )
87+
88+ ** Reproduce:**
89+ Here you will se an example with aws cli how to reproduce it
90+
91+ ``` plan
92+ # This is a lifecycle config example
93+ $ cat lifecycle.json
94+ {
95+ "Rules": [
96+ {
97+ "ID": "ExpireOldObjects",
98+ "Prefix": "",
99+ "Status": "Enabled",
100+ "Expiration": {
101+ "Days": 30
102+ }
103+ }
104+ ]
105+ }
106+
107+ # Put lifecycle config in to our bucket
108+ $ aws s3api put-bucket-lifecycle-configuration \
109+ --bucket testbucket \
110+ --lifecycle-configuration file://lifecycle.json \
111+ --endpoint-url https://objectstorage-replicated.dus2.cloud.syseleven.net
112+
113+ # Verify lifecycle config is there
114+ $ aws s3api get-bucket-lifecycle-configuration \
115+ --bucket testbucket \
116+ --endpoint-url https://objectstorage-replicated.dus2.cloud.syseleven.net
117+ {
118+ "Rules": [
119+ {
120+ "Expiration": {
121+ "Days": 30
122+ },
123+ "ID": "ExpireOldObjects",
124+ "Prefix": "",
125+ "Status": "Enabled"
126+ }
127+ ]
128+ }
129+
130+ # Delete the lifecycle config
131+ $ aws s3api delete-bucket-lifecycle \
132+ --bucket testbucket \
133+ --endpoint-url https://objectstorage-replicated.dus2.cloud.syseleven.net
134+
135+ # Check if the lifecycle is deleted or not
136+ $ aws s3api get-bucket-lifecycle-configuration \
137+ --bucket testbucket \
138+ --endpoint-url https://objectstorage-replicated.dus2.cloud.syseleven.net
139+ {
140+ "Rules": [
141+ {
142+ "Expiration": {
143+ "Days": 30
144+ },
145+ "ID": "ExpireOldObjects",
146+ "Prefix": "",
147+ "Status": "Enabled"
148+ }
149+ ]
150+ }
151+ ```
152+
153+ ** Workaround:**
154+ As a workaround till the upstream fixes the issue in next release, you can Disable your lifecycle config.
155+
156+ ``` plain
157+ # This is a disabled lifecycle config example
158+ $ cat lifecycle.json
159+ {
160+ "Rules": [
161+ {
162+ "ID": "ExpireOldObjects",
163+ "Prefix": "",
164+ "Status": "Disabled",
165+ "Expiration": {
166+ "Days": 30
167+ }
168+ }
169+ ]
170+ }
171+
172+ # Put disabled lifecycle config in to our bucket
173+ $ aws s3api put-bucket-lifecycle-configuration \
174+ --bucket testbucket \
175+ --lifecycle-configuration file://lifecycle.json \
176+ --endpoint-url https://objectstorage-replicated.dus2.cloud.syseleven.net
177+
178+ # Verify lifecycle config is disabled
179+ $ aws s3api get-bucket-lifecycle-configuration \
180+ --bucket testbucket \
181+ --endpoint-url https://objectstorage-replicated.dus2.cloud.syseleven.net
182+ {
183+ "Rules": [
184+ {
185+ "Expiration": {
186+ "Days": 30
187+ },
188+ "ID": "ExpireOldObjects",
189+ "Prefix": "",
190+ "Status": "Disabled"
191+ }
192+ ]
193+ }
194+ ```
0 commit comments