Bug #41652
closedrgw lc does not delete objects that do not have the same tags
0%
Description
It is possible that object will have multiple tags more than the rule that applied on.
For example:
Example 4: Tag-based Filtering and Resulting Conflicting Lifecycle Actions
Suppose that you have the following lifecycle policy that has two rules, each specifying a tag filter:
Rule 1 specifies a tag-based filter (tag1/value1). This rule directs Amazon S3 to transition objects to the GLACIER storage class 365 days after creation.
Rule 2 specifies a tag-based filter (tag2/value2). This rule directs Amazon S3 to expire objects 14 days after creation.
The lifecycle configuration is shown following:
<LifecycleConfiguration>
<Rule>
<ID>Rule 1</ID>
<Filter>
<Tag>
<Key>tag1</Key>
<Value>value1</Value>
</Tag>
</Filter>
<Status>Enabled</Status>
<Transition>
<StorageClass>GLACIER<StorageClass>
<Days>365</Days>
</Transition>
</Rule>
<Rule>
<ID>Rule 2</ID>
<Filter>
<Tag>
<Key>tag2</Key>
<Value>value1</Value>
</Tag>
</Filter>
<Status>Enabled</Status>
<Expiration>
<Days>14</Days>
</Expiration>
</Rule>
</LifecycleConfiguration>
The policy is fine, but if there is an object with both tags, then S3 has to decide what to do. That is, both rules apply to an object and in effect you are directing Amazon S3 to perform conflicting actions. In this case, Amazon S3 expires the object 14 days after creation. The object is removed, and therefore the transition action does not come into play.
Object is not being deleted if not all tags exactly the same as in the rule.
Updated by Abhishek Lekshmanan over 4 years ago
- Assignee set to Abhishek Lekshmanan
Updated by Abhishek Lekshmanan over 4 years ago
- Assignee changed from Abhishek Lekshmanan to Or Friedmann
Updated by Or Friedmann over 4 years ago
solved by this PR: https://github.com/ceph/ceph/pull/30151
Updated by Or Friedmann about 4 years ago
- Status changed from New to Pending Backport
- Backport set to nautilus
Updated by Nathan Cutler about 4 years ago
- Copied to Backport #45502: nautilus: rgw lc does not delete objects that do not have the same tags added
Updated by Nathan Cutler about 4 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".