-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Conversation
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>
@jmunhoz see my comment, other than that looking good. Is there an open ceph trackeer ticket for this feature? |
@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>
@yehudasa the new commit handles the request param for signed urls. |
@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? |
@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. |
@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>
rgw: bucket request payment support Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
@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 |
@yehudasa ok |
Add bucket request payment feature.
Fixes: #13427
Signed-off-by: Javier M. Mellid jmunhoz@igalia.com