Bug #39654
rgw: Put LC doesn't clear existing lifecycle
% Done:
0%
Source:
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Description
Currently doing something like put LC; use a changed LC; put LC; get LC will return the first supplied LC unless there was a delete involved.
(aws) [abhishekl@d18:~/spells/pyspells/s3]$ cat abortmp.json { "Rules": [ { "AbortIncompleteMultipartUpload" : { "DaysAfterInitiation": 7 }, "ID": "Expire v1 objects", "Prefix": "", "Status": "Enabled" } ] } (aws) [abhishekl@d18:~/spells/pyspells/s3]$ cat transition.json { "Rules": [ { "Transition" : { "Days": 10, "StorageClass": "rrs" }, "Expiration" : { "Days": 20 }, "ID": "Transition abc objects", "Status": "Enabled", "Prefix":"abc" }, { "Expiration" : { "Days": 10 }, "ID": "Expire bcd objects", "Status": "Enabled", "Prefix":"bcd" } ] } (aws) [abhishekl@d18:~/spells/pyspells/s3]$ aws s3api create-bucket --bucket test --endpoint=http://localhost:8000 (aws) [abhishekl@d18:~/spells/pyspells/s3]$ aws s3api put-bucket-lifecycle --bucket test --lifecycle-configuration file://transition.json (aws) [abhishekl@d18:~/spells/pyspells/s3]$ aws s3api get-bucket-lifecycle --bucket test { "Rules": [ { "Status": "Enabled", "Prefix": "bcd", "Expiration": { "Days": 10 }, "ID": "Expire bcd objects" }, { "Status": "Enabled", "Prefix": "abc", "Transition": { "Days": 10, "StorageClass": "rrs" }, "Expiration": { "Days": 20 }, "ID": "Transition abc objects" } ] } (aws) [abhishekl@d18:~/spells/pyspells/s3]$ aws s3api put-bucket-lifecycle --bucket test --lifecycle-configuration file://abortmp.json (aws) [abhishekl@d18:~/spells/pyspells/s3]$ aws s3api get-bucket-lifecycle --bucket test { "Rules": [ { "Status": "Enabled", "Prefix": "bcd", "Expiration": { "Days": 10 }, "ID": "Expire bcd objects" }, { "Status": "Enabled", "Prefix": "abc", "Transition": { "Days": 10, "StorageClass": "rrs" }, "Expiration": { "Days": 20 }, "ID": "Transition abc objects" } ] }
Related issues
History
#1 Updated by Abhishek Lekshmanan almost 5 years ago
- Assignee set to Abhishek Lekshmanan
- Priority changed from Normal to High
#2 Updated by Casey Bodley almost 5 years ago
s3tests for backport in https://github.com/ceph/s3-tests/pull/275
#3 Updated by Casey Bodley almost 5 years ago
Don't we need this fix on mimic/luminous?
#4 Updated by Abhishek Lekshmanan almost 5 years ago
Actually this came up as a part of hte nautilus refactor of LC code, the previous code was actually in rgw_op https://github.com/ceph/ceph/commit/36a1895d8fa7a94a7f12f509d9300f8d1f080c4a
This will affect https://github.com/ceph/ceph/pull/27966
#5 Updated by Matt Benjamin almost 5 years ago
Thanks, I'll add it to the backport.
Matt
#6 Updated by Casey Bodley almost 5 years ago
- Pull request ID set to 28049
#7 Updated by Casey Bodley almost 5 years ago
- Status changed from New to 7
#8 Updated by Casey Bodley almost 5 years ago
- Status changed from 7 to Pending Backport
#9 Updated by Nathan Cutler almost 5 years ago
- Copied to Backport #40512: nautilus: rgw: Put LC doesn't clear existing lifecycle added
#10 Updated by Nathan Cutler over 4 years ago
- Status changed from Pending Backport to Resolved