Bug 1329642

Summary: An expired object delete request before rgw_objexp_gc_interval value is successful but with an error message
Product: Red Hat Ceph Storage Reporter: shilpa <smanjara>
Component: RGWAssignee: Yehuda Sadeh <yehuda>
Status: CLOSED NOTABUG QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.0CC: cbodley, ceph-eng-bugs, hnallurv, kbader, kdreyer, mbenjamin, owasserm, smanjara, sweil
Target Milestone: rc   
Target Release: 2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-04 07:24:41 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:

Description shilpa 2016-04-22 12:46:35 UTC
Description of problem:
Create an object with expirer set on it. Now delete the object after it has expired but before gc clean up. The delete is successful but an error message appears: 

Error Deleting: container1/s3del.py: Object DELETE failed: http://rgw:8080/swift/v1/container1/s3del.py 404 Not Found   NoSuchKey


While this is a valid message for most operations post expiry. like GET/POST/HEAD, if the delete operation is allowed to succeed, I don't think the error message is appropriate.

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

ceph-radosgw-10.1.1-1.el7cp.x86_64


Additional info:

# swift -A http://rgw:8080/auth/1.0 -U testuser:swift -K 'Zft6BBPlyHEN4KqwrDELiTPFVbsc1QrUUVJTxBD7' stat container1 s3del.py
       Account: v1
     Container: container1
        Object: s3del.py
  Content Type: binary/octet-stream
Content Length: 450
 Last Modified: Fri, 22 Apr 2016 12:38:45 GMT
          ETag: 7a654761503569d45f64511062482fad
    Meta Mtime: 1460450678.866671
   X-Delete-At: 1461328745
 Accept-Ranges: bytes
   X-Timestamp: 1461328725.78484
    X-Trans-Id: tx000000000000000000024-00571a1b69-1045-default

# swift -A http://rgw:8080/auth/1.0 -U testuser:swift -K 'Zft6BBPlyHEN4KqwrDELiTPFVbsc1QrUUVJTxBD7' stat container1 s3del.py
Object HEAD failed: http://rgw:8080/swift/v1/container1/s3del.py 404 Not Found

# swift -A http://rgw:8080/auth/1.0 -U testuser:swift -K 'Zft6BBPlyHEN4KqwrDELiTPFVbsc1QrUUVJTxBD7' list container1
s3del.py

# swift -A http://rgw:8080/auth/1.0 -U testuser:swift -K 'Zft6BBPlyHEN4KqwrDELiTPFVbsc1QrUUVJTxBD7' delete container1 s3del.py
Error Deleting: container1/s3del.py: Object DELETE failed: http://rgw:8080/swift/v1/container1/s3del.py 404 Not Found   NoSuchKey

# swift -A http://rgw:8080/auth/1.0 -U testuser:swift -K 'Zft6BBPlyHEN4KqwrDELiTPFVbsc1QrUUVJTxBD7' list container1
# 

2016-04-22 12:39:16.436202 7fe1667fc700 20  bucket index object: .dir.9c8af41c-c34d-4fd5-9556-0ea437bc654e.4154.1
2016-04-22 12:39:16.480801 7fe1667fc700  2 req 46:0.045807:swift:DELETE /swift/v1/container1/s3del.py:delete_obj:completing
2016-04-22 12:39:16.480872 7fe1667fc700  2 req 46:0.045877:swift:DELETE /swift/v1/container1/s3del.py:delete_obj:op status=-2
2016-04-22 12:39:16.480877 7fe1667fc700  2 req 46:0.045882:swift:DELETE /swift/v1/container1/s3del.py:delete_obj:http status=404
2016-04-22 12:39:16.480881 7fe1667fc700  1 ====== req done req=0x7fe1667f6690 op status=-2 http_status=404 ======
2016-04-22 12:39:16.480894 7fe1667fc700 20 process_request() returned -2
2016-04-22 12:39:16.480916 7fe1667fc700  1 civetweb: 0x7fe10c0008c0: 10.8.128.75 - - [22/Apr/2016:12:39:16 +0000] "DELETE /swift/v1/container1/s3del.py HTTP/1.1" 404 0 - python-swiftclient-3.0.0

Comment 3 Yehuda Sadeh 2016-05-03 17:41:46 UTC
Have you made sure that this is not the expected behaviour? Need to validate how swift behaves in the same case.

Comment 4 shilpa 2016-05-04 07:24:41 UTC
(In reply to Yehuda Sadeh from comment #3)
> Have you made sure that this is not the expected behaviour? Need to validate
> how swift behaves in the same case.

Ok it seems like this is the expected behavior. Found some references: https://bugs.launchpad.net/swift/+bug/1069849 and http://tracker.ceph.com/issues/13469. 
Closing this BZ.