Bug 1504291

Summary: List Bucket incorrectly handles marker argument on versioned buckets
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Casey Bodley <cbodley>
Component: RGWAssignee: Matt Benjamin (redhat) <mbenjamin>
Status: CLOSED ERRATA QA Contact: Vidushi Mishra <vimishra>
Severity: medium Docs Contact: Bara Ancincova <bancinco>
Priority: medium    
Version: 3.0CC: agunn, anharris, cbodley, ceph-eng-bugs, edonnell, jbrier, kbader, kdreyer, mbenjamin, owasserm, sweil, tchandra, vimishra
Target Milestone: rcKeywords: TestOnly
Target Release: 3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: ceph-12.2.4-6.el7cp Ubuntu: ceph_12.2.4-7redhat1xenial Doc Type: Bug Fix
Doc Text:
.Marker objects no longer appear twice when listing objects Previously, due to an error in processing, "marker" objects that were used to continue multi-segment listings were included incorrectly in the listing result. Consequently, such objects appeared twice in the listing output. With this update to {product}, objects are only listed once, as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-26 18:16:44 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: 1584264    

Description Casey Bodley 2017-10-19 21:11:54 UTC
Description of problem:

When providing an object name in the 'marker' argument to list a versioned bucket, that object name is present in the bucket listing results.

This happens because the versioned entries for that object name sort after the object name itself (ie object.jpg sorts before versioned object.jpgkS2nQv9yOlFQZCTgTvDoR0XtHAg6pDd).


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


How reproducible:

Always, when versioning is enabled on the bucket and a marker is specified that matches an existing object name.

Steps to Reproduce:
1. Create a bucket
2. Enable versioning on the bucket
3. Upload some objects a.jpg b.jpg c.jpg
4. List the bucket with marker=b.jpg

with boto2, this looks like: bucket.list(marker='b.jpg')

Actual results:

[<Key: bucket,b.jpg>, <Key: bucket,c.jpg>]

Expected results:

[<Key: bucket,c.jpg>]

Additional info:

Comment 11 errata-xmlrpc 2018-09-26 18:16:44 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-2018:2819