Actions
Bug #39654
closedrgw: 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" } ] }
Actions