Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1493476 - [ rgw ]: Enabling Lifecycle on a bucket, for expiration day=0, getting XML error instead of deleting object immediately
[ rgw ]: Enabling Lifecycle on a bucket, for expiration day=0, getting XML ...
Status: ASSIGNED
Product: Red Hat Ceph Storage
Classification: Red Hat
Component: RGW (Show other bugs)
3.0
Unspecified Unspecified
medium Severity low
: rc
: 3.*
Assigned To: Matt Benjamin (redhat)
ceph-qe-bugs
Bara Ancincova
:
Depends On:
Blocks: 1494421
  Show dependency treegraph
 
Reported: 2017-09-20 05:48 EDT by Shreekar
Modified: 2018-10-18 12:56 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
.The `Expiration, Days` S3 Lifecycle parameter cannot be set to `0` The Ceph Object Gateway does not accept the value of `0` for the `Expiration, Days` Lifecycle configuration parameter. Consequently, setting the expiration to `0` cannot be used to trigger background delete operation of objects. To work around this problem, delete objects directly.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Test case which sets expiration of 0 day (1.19 KB, text/plain)
2017-09-20 07:46 EDT, Shreekar
no flags Details

  None (edit)
Description Shreekar 2017-09-20 05:48:11 EDT
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 Shreekar 2017-09-20 07:46 EDT
Created attachment 1328402 [details]
Test case which sets expiration of 0 day

Note You need to log in before you can comment on or make changes to this bug.