Project

General

Profile

Bug #47167

rgw: lifecycle: Days can not be 0 for Expiration rules

Added by Aleksandr Rudenko 24 days ago. Updated 16 days ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Target version:
% Done:

0%

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

Description

Hi RGW team,

Nautilus 14.2.11.
I can apply next rule:

aws s3api get-bucket-lifecycle-configuration --bucket test-cc45ce9b-43c8-4e28-8a9a-a9d3ad0a2652

{
    "Rules": [
        {
            "Status": "Enabled",
            "Prefix": "",
            "Expiration": {
                "Days": 0
            },
            "ID": "remove old objects" 
        }
    ]
}

But in AWS s3:

aws s3api put-bucket-lifecycle-configuration --lifecycle-configuration  file://~/ownCloud/ownCloud-tmp/s3-example/lc_by_days.json --bucket test-fatruden

An error occurred (InvalidArgument) when calling the PutBucketLifecycleConfiguration operation: 'Days' for Expiration action must be a positive integer

In Luminous 12.2.12 we couldn't apply this rule. Validation worked fine on Luminous.

I think it was changed in this issue: https://tracker.ceph.com/issues/38389

But it's not correct.

There are two type of lifecycle rules:
1. Expiration rules (removing objects)
2. Transition rules (moving objects to another storage class)

For Expiration rules AWS s3 doesn't allow Days=0, for Transition rules it's possible to specify Days=0.

You can read about it in https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-configuration-examples.html
And you can reproduce it with AWS S3 and awscli.


Related issues

Copied to rgw - Backport #47318: nautilus: rgw: lifecycle: Days can not be 0 for Expiration rules New

History

#1 Updated by Or Friedmann 16 days ago

  • Assignee set to Or Friedmann

#2 Updated by Or Friedmann 16 days ago

  • Status changed from New to Pending Backport
  • Backport set to nautilus
  • Pull request ID set to 30878

#3 Updated by Nathan Cutler 14 days ago

  • Copied to Backport #47318: nautilus: rgw: lifecycle: Days can not be 0 for Expiration rules added

Also available in: Atom PDF