Bug 1661504

Summary: [RFE] append x-amz-version-id in PUT response
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Karun Josy <kjosy>
Component: RGWAssignee: Casey Bodley <cbodley>
Status: CLOSED ERRATA QA Contact: RUDRA PRATAP <rpratap>
Severity: high Docs Contact: Erin Donnelly <edonnell>
Priority: high    
Version: 3.1CC: agunn, cbodley, ceph-eng-bugs, ceph-qe-bugs, kbader, kjosy, mbenjamin, pasik, rpratap, sweil, tchandra, tserlin
Target Milestone: rcKeywords: FutureFeature
Target Release: 3.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: ceph-12.2.12-8.el7cp Ubuntu: ceph_12.2.12-6redhat1 Doc Type: Enhancement
Doc Text:
.The `x-amz-version-id` header is now supported The `x-amz-version-id` header is now returned by PUT operations on versioned buckets to conform to the S3 protocol. With this enhancement, clients now know the version ID of the objects they create.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-21 15:10:24 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: 1726135    

Description Karun Josy 2018-12-21 11:59:21 UTC
* Description of problem:
In our official doc [1] under section 'Table 2.2. Unsupported Header Fields' it is mentioned that we currently do not support some request and response headers like 'w-amz-version-id' and 'x-amz-id-2'
  
Are we planning to support these in future?

This is a blocker for one of our clients.

Thanks!

[1] https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/3/html/developer_guide/ceph-object-gateway-s3-api

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

Comment 4 Yaniv Kaul 2018-12-24 11:53:25 UTC
(In reply to Karun Josy from comment #0)
> * Description of problem:
> In our official doc [1] under section 'Table 2.2. Unsupported Header Fields'
> it is mentioned that we currently do not support some request and response
> headers like 'w-amz-version-id' and 'x-amz-id-2'

I believe it's 'x-amz-version-id'

Comment 5 Matt Benjamin (redhat) 2019-01-03 15:56:48 UTC
(In reply to Yaniv Kaul from comment #4)
> (In reply to Karun Josy from comment #0)
> > * Description of problem:
> > In our official doc [1] under section 'Table 2.2. Unsupported Header Fields'
> > it is mentioned that we currently do not support some request and response
> > headers like 'w-amz-version-id' and 'x-amz-id-2'
> 
> I believe it's 'x-amz-version-id'

That is correct.  I don't know why we currently don't return values for x-amz-version-id and x-amz-request-id, and will look into that.  Since x-amz-id-2 is documented as having an opaque value used by Amazon for debugging, I doubt we would choose to return it.

Matt

Comment 6 Matt Benjamin (redhat) 2019-01-03 15:59:45 UTC
(In reply to Matt Benjamin (redhat) from comment #5)
> (In reply to Yaniv Kaul from comment #4)
> > (In reply to Karun Josy from comment #0)
> > > * Description of problem:
> > > In our official doc [1] under section 'Table 2.2. Unsupported Header Fields'
> > > it is mentioned that we currently do not support some request and response
> > > headers like 'w-amz-version-id' and 'x-amz-id-2'
> > 
> > I believe it's 'x-amz-version-id'
> 
> That is correct.  I don't know why we currently don't return values for
> x-amz-version-id and x-amz-request-id, and will look into that.  Since
> x-amz-id-2 is documented as having an opaque value used by Amazon for
> debugging, I doubt we would choose to return it.
> 
> Matt

Actually, sorry, we DO return both x-amz-version-id and x-amz-request-id, when either have a value.  So the only case in which we do not return a value for x-amz-version-id is in the no-version/versioning suspended case--where Amazon AWS would return 'x-amz-version-id: null'.  Probably we should do the same.

Matt

Comment 17 RUDRA PRATAP 2019-07-30 04:51:53 UTC
Hi Matt,

Ceph RGW fully supports returning the x-amz-version-id header in PUT requests, (CEPH V 3.3) , the bucket is versioned..


---> s3cmd put cobbler.ks s3://my-new-bucket/ -d
......
......
......
DEBUG: format_uri(): /my-new-bucket/cobbler.ks
 10922 of 10922   100% in    0s  1395.71 kB/sDEBUG: ConnMan.put(): connection put back to pool (http://magna107:80#1)
DEBUG: Response:
{'data': '',
 'headers': {'accept-ranges': 'bytes',
             'content-length': '0',
             'date': 'Tue, 30 Jul 2019 04:42:44 GMT',
             'etag': '"73207fad64b54f01a60521e674cc310a"',
             'x-amz-request-id': 'tx000000000000000000021-005d3fcac4-a71cf-default',
             'x-amz-version-id': 'JDHTiM3DcRwl73MJ7.bgEmnlU-5fDBI'},
 'reason': 'OK',
 'size': 10922,
 'status': 200}
 10922 of 10922   100% in    0s    82.07 kB/s  done
DEBUG: MD5 sums: computed=73207fad64b54f01a60521e674cc310a, received=73207fad64b54f01a60521e674cc310a


Let me know if u need more details.

Rudra

Comment 19 errata-xmlrpc 2019-08-21 15:10:24 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/RHSA-2019:2538