Bug 1654588

Summary: [rfe]: rgw: does not support lifecycle rules whose filters a) lack PREFIX b) contain TAG c) use AND/conjunction
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Karun Josy <kjosy>
Component: RGWAssignee: Matt Benjamin (redhat) <mbenjamin>
Status: CLOSED ERRATA QA Contact: Vidushi Mishra <vimishra>
Severity: high Docs Contact: Aron Gunn <agunn>
Priority: high    
Version: 3.1CC: agunn, anharris, assingh, cbodley, ceph-eng-bugs, ceph-qe-bugs, edonnell, igreen, kbader, kjosy, mbenjamin, sweil, tchandra, tserlin, vimishra
Target Milestone: z1Keywords: FutureFeature
Target Release: 3.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: ceph-12.2.8-89.el7cp Ubuntu: ceph_12.2.8-75redhat1xenial Doc Type: Bug Fix
Doc Text:
.Lifecycle rules with multiple tag filters are no longer rejected Due to a bug in lifecycle rule processing, an attempt to install the lifecycle rules with multiple tag filters was rejected and the `InvalidRequest` error message was returned. With this update, other rule forms are used, and lifecycle rules with multiple tag filters are no longer rejected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-07 15:51:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1629656    
Attachments:
Description Flags
test_lc_xml_doesnt_work
none
rgw-debug-log
none
test with hotfix none

Description Karun Josy 2018-11-29 07:44:04 UTC
Created attachment 1509748 [details]
test_lc_xml_doesnt_work

* Description of problem:

When creating and uploading a lifecycle configuration which has 2 rules with tags for objects and using "Filter" option;  it doesn't work. 
In such cases when using setlifecycle command, it gives "S3 error: 400 (InvalidRequest)".

* Version-Release number of selected component (if applicable):
3.1

* How reproducible:
Always

* Steps to Reproduce:

- Download the script attached "test_lc_xml_doesnt_work"
- Create a bucket
- Use s3cmd to set the lc policy
   # s3cmd setlifecycle test_lc_xml_doesnt_work s3://bucket-name


Actual results:
   # s3cmd setlifecycle test_lc_xml_doesnt_work s3://lctest
   ERROR: S3 error: 400 (InvalidRequest)

Expected results:
 # s3cmd setlifecycle test_lc_xml_doesnt_work s3://lctest
 s3://lctest/:   Policy updated.

Additional info:
For the same configuration, if we use "Prefix" option instead of "Filter"  it works.

Comment 3 Karun Josy 2018-11-29 07:46:50 UTC
I have also attached the rgw  log with debug level 20.
----
# date
Thu Nov 29 13:10:59 IST 2018
# s3cmd setlifecycle test_lc_xml_doesnt_work s3://lctest
ERROR: S3 error: 400 (InvalidRequest)
------

Comment 4 Karun Josy 2018-11-29 07:48:19 UTC
Created attachment 1509749 [details]
rgw-debug-log

Comment 44 Ilan Green 2019-02-13 17:29:29 UTC
Created attachment 1534473 [details]
test with hotfix

Comment 68 errata-xmlrpc 2019-03-07 15:51:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0475

Comment 69 Red Hat Bugzilla 2023-09-14 04:43:01 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days