Project

General

Profile

Actions

Bug #39654

closed

rgw: Put LC doesn't clear existing lifecycle

Added by Abhishek Lekshmanan almost 5 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
High
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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 1 (0 open1 closed)

Copied to rgw - Backport #40512: nautilus: rgw: Put LC doesn't clear existing lifecycleResolvedNathan CutlerActions
Actions

Also available in: Atom PDF