Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: bucket request payment support #6214

Merged
merged 5 commits into from
Nov 6, 2015

Conversation

jmunhoz
Copy link
Contributor

@jmunhoz jmunhoz commented Oct 9, 2015

Add bucket request payment feature.

Fixes: #13427

Signed-off-by: Javier M. Mellid jmunhoz@igalia.com

Implement requestPayment retrieval to find out who is paying when
accessing a resource (BucketOwner or Requester)

Fixes: ceph#13427

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Allow owner to change the RequestPayment configuration to BucketOwner or
Requester.

Fixes: ceph#13427

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
In order to access buckets configured as 'requester pays', client must
include 'x-amz-request-payer' directive with the value 'requester'.

Fixes: ceph#13427

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
@yehudasa
Copy link
Member

@jmunhoz see my comment, other than that looking good. Is there an open ceph trackeer ticket for this feature?

@jmunhoz
Copy link
Contributor Author

jmunhoz commented Oct 13, 2015

@yehudasa Great! I will have a look in the signed urls handling. Yes, I created ticket http://tracker.ceph.com/issues/13427 to track this feature.

Fixes: ceph#13427

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
@jmunhoz
Copy link
Contributor Author

jmunhoz commented Oct 15, 2015

@yehudasa the new commit handles the request param for signed urls.

@yehudasa
Copy link
Member

@jmunhoz looks good. My only question is how does this work? Don't we also need to tie it into the usage logging somehow, or is the info we have there is good enough?

@jmunhoz
Copy link
Contributor Author

jmunhoz commented Oct 20, 2015

@yehudasa the current code would implement the S3's bucket request payment interface. This implementation is useful to reuse client code developed against the same interface in AWS without modifications. If this interface is not in place you can't use in Ceph your scripts supporting bucket payment request. They refuse to run as expected. The patch should get some of those scripts running Okay. I thought this first patchset as an independent feature of billing and reporting too.

By the way, I think the AWS's 'Billing and Reporting of Buckets' could make sense in Ceph too although I see this functionality as a new patchset on top of S3's bucket request interface. Maybe the next step could be working on tracking the number of requests and the storage but I don't know if this information is available in this moment as part of logging usage or the best place to add it?

What do you think about splitting the S3 bucket request payment interface of billing and reporting? I think it adds value per se.

@yehudasa
Copy link
Member

@jmunhoz billing and reporting can be done separately. What we should be doing here though is maybe add extra information to the usage logging so that it includes the payer info (take a look at rgw_log.cc, rgw_usage.cc).

If the request in one Requester Pays bucket succeeds the response has to
include the header 'x-amz-request-charged: requester'.

Fixes: ceph#13427

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
yehudasa added a commit that referenced this pull request Nov 6, 2015
rgw: bucket request payment support

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
@yehudasa yehudasa merged commit 899d775 into ceph:master Nov 6, 2015
@yehudasa
Copy link
Member

yehudasa commented Nov 6, 2015

@jmunhoz I merged it in as is, however, we would still need some tighter integration with the usage statistics, or some other rgw internal logging mechanism

@jmunhoz
Copy link
Contributor Author

jmunhoz commented Nov 9, 2015

@yehudasa ok

@jmunhoz
Copy link
Contributor Author

jmunhoz commented Nov 19, 2015

@yehudasa tighter integration with the usage statistics available at #6656

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants