Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 1493476

Summary: [ rgw ]: Enabling Lifecycle on a bucket, for expiration day=0, getting XML error
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Persona non grata <nobody+410372>
Component: RGWAssignee: Matt Benjamin (redhat) <mbenjamin>
Status: CLOSED ERRATA QA Contact: Tejas <tchandra>
Severity: medium Docs Contact: Bara Ancincova <bancinco>
Priority: medium    
Version: 3.0CC: anharris, cbodley, ceph-eng-bugs, gsitlani, hnallurv, kbader, mbenjamin, nobody+410372, sweil, tchandra, tserlin
Target Milestone: rc   
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-14.2.4-14.el8cp, ceph-14.2.4-2.el7cp Doc Type: Bug Fix
Doc Text:
.The `Expiration, Days` S3 Lifecycle parameter can now be set to `0` The Ceph Object Gateway did not accept the value of `0` for the `Expiration, Days` Lifecycle configuration parameter. Consequently, setting the expiration to `0` could not be used to trigger background delete operation of objects. With this update, `Expiration, Days` can be set to `0` as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-31 12:44:52 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: 1494421, 1730176    
Attachments:
Description Flags
Test case which sets expiration of 0 day none

Description Persona non grata 2017-09-20 09:48:11 UTC
Description of problem:
Enable lifecycle on a bucket and set the number of days to 0, which expires objects immediately. It returned XML error instead of deleting objects.

Version-Release number of selected component (if applicable):
Ceph 3.0 

How reproducible:
Always

Steps to Reproduce:
1.Set up a ceph 3.0 cluster.
2.Enable lifecycle on a bucket.
3.Set expiration for objects to 0 day(s).
4.Objects  will get deleted immediately.

Actual results:

[root@magna118 ~]# python tc11198.py 
log/0ABC.txt
Traceback (most recent call last):
  File "tc11198.py", line 38, in <module>
    mybucket.configure_lifecycle(lifecycle)
  File "/usr/lib/python2.7/site-packages/boto-2.48.0-py2.7.egg/boto/s3/bucket.py", line 1366, in configure_lifecycle
    response.status, response.reason, body)
boto.exception.S3ResponseError: S3ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?><Error><Code>InvalidArgument</Code><BucketName>redhat</BucketName><RequestId>tx0000000000000000001f7-0059bb820b-1077-default</RequestId><HostId>1077-default-default</HostId></Error>


Expected results:
Objects will expire immediately.


Additional info:
Test case: CEPH 11198 Specify the number of days in lifecycle rule to 0

Comment 3 Persona non grata 2017-09-20 11:46:35 UTC
Created attachment 1328402 [details]
Test case which sets expiration of 0 day

Comment 18 Giridhar Ramaraju 2019-08-05 13:10:19 UTC
Updating the QA Contact to a Hemant. Hemant will be rerouting them to the appropriate QE Associate. 

Regards,
Giri

Comment 19 Giridhar Ramaraju 2019-08-05 13:11:24 UTC
Updating the QA Contact to a Hemant. Hemant will be rerouting them to the appropriate QE Associate. 

Regards,
Giri

Comment 28 errata-xmlrpc 2020-01-31 12:44:52 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-2020:0312

Comment 29 Red Hat Bugzilla 2023-09-18 00:12:44 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days