Project

General

Profile

Actions

Bug #47167

closed

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

Added by Aleksandr Rudenko over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Or Friedmann
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 (v1):
Crash signature (v2):

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

Copied to rgw - Backport #47318: nautilus: rgw: lifecycle: Days can not be 0 for Expiration rulesResolvedNathan CutlerActions
Actions #1

Updated by Or Friedmann over 3 years ago

  • Assignee set to Or Friedmann
Actions #2

Updated by Or Friedmann over 3 years ago

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

Updated by Nathan Cutler over 3 years ago

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

Updated by Nathan Cutler over 3 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF