Bug 1399624

Summary: fix for deleting objects name beginning and ending with underscores of one bucket using POST method of js sdk
Product: Red Hat Ceph Storage Reporter: Orit Wasserman <owasserm>
Component: RGWAssignee: Matt Benjamin (redhat) <mbenjamin>
Status: CLOSED ERRATA QA Contact: Ramakrishnan Periyasamy <rperiyas>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.1CC: cbodley, ceph-eng-bugs, hnallurv, kbader, kdreyer, mbenjamin, owasserm, sweil
Target Milestone: rc   
Target Release: 2.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: ceph-10.2.5-17.el7cp Ubuntu: ceph_10.2.5-10redhat1xenial Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-14 15:47:01 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 Orit Wasserman 2016-11-29 12:58:23 UTC
Description of problem:

hose objects name beginning and ending with underscores can not be deleted using POST method of js sdk

body of http:
<Delete xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Object><Key>_new.txt</Key></Object><Object><Key>_new_again.txt</Key></Object></Delete>


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Orit Wasserman 2016-11-29 14:05:48 UTC
upstream fix:
https://github.com/ceph/ceph/pull/11982

Comment 3 Orit Wasserman 2016-12-06 12:06:36 UTC
additional fix:
https://github.com/ceph/ceph/pull/12262

Comment 4 Ken Dreyer (Red Hat) 2017-01-03 21:56:42 UTC
Orit, would you please check Loic's backport to jewel upstream and approve it if it properly fixes this issue?

Comment 5 Orit Wasserman 2017-01-04 19:10:36 UTC
(In reply to Ken Dreyer (Red Hat) from comment #4)
> Orit, would you please check Loic's backport to jewel upstream and approve
> it if it properly fixes this issue?

Loic's backport looks good (https://github.com/ceph/ceph/pull/12320), it still needs to pass teuthology run.

Comment 9 Ken Dreyer (Red Hat) 2017-01-30 20:35:53 UTC
Matt, Orit, are we still waiting on a successful Teuthology run with this change, or can it go downstream now?

Comment 16 Ramakrishnan Periyasamy 2017-02-13 13:41:27 UTC
Moving this bug to verified state.

Objects starts and ending with '_' are getting deleted.

Before deleting objects:
[ubuntu@host023 ~]$ swift -A http://xx.xx.xx.xx:8080/auth/v1.0 -U testuser:swift -K 9DNt6EQQkdOFfslQy3XM7FKQnkpA4C9zfCikHqgs list current_myobj
_myobj_
_myobjabc
_myobjabc_
my_obj

After deleting objects:
[ubuntu@host023 ~]$ swift -A http://xx.xx.xx.xx:8080/auth/v1.0 -U testuser:swift -K 9DNt6EQQkdOFfslQy3XM7FKQnkpA4C9zfCikHqgs list current
my_obj

Python boto used for deleting objects in bulk. Thanks Orit for sharing this information.

bucket = conn.get_bucket('current')
keys_to_delete = ['_myobj','_myobj_','_myobjabc','_myobjabc_']
result = bucket.delete_keys(keys_to_delete)

Comment 18 errata-xmlrpc 2017-03-14 15:47:01 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://rhn.redhat.com/errata/RHBA-2017-0514.html