Bug #37863
open
Luminous: rgw admin ops via REST returns 501 for routes documented as functional
Added by Keaton Cross over 5 years ago.
Updated over 5 years ago.
Description
Hello,
I'm attempting to allow for my Ceph object store to be manage through a custom REST client. Specifically, I'm attempting to use the Admin Operations API for RGW to change User Quotas. According to the documentation here: http://docs.ceph.com/docs/luminous/radosgw/adminops/#quotas this should be possible.
I'm able to GET the JSON formatted user quota information via REST, however when I make a PUT request I get a 501 Not Implemented response. I've discovered similarly that making a GET request for getting user information results in a 501.
This seems to be a bug to me, considering the documentation lists these endpoints as functional. Am I doing something incorrectly?
Hello,
I'm attempting to allow for my Ceph object store to be manage through a custom REST client. Specifically, I'm attempting to use the Admin Operations API for RGW to change User Quotas. According to the documentation here: http://docs.ceph.com/docs/luminous/radosgw/adminops/#quotas this should be possible.
I'm able to GET the JSON formatted user quota information via REST, however when I make a PUT request I get a 501 Not Implemented response. I've discovered similarly that making a GET request for getting user information results in a 501. I know my request is formatted properly since the GET works properly, so it's not an issue with the wrong endpoint or HTTP request format.
This seems to be a bug to me, considering the documentation lists these endpoints as functional. Am I doing something incorrectly?
Gonna close this as the route IS functional, however the documentation on this is severely lacking, as well as poor error handling on failure cases.
My issue was that the JSON response from the GET quota command returns a dictionary with keys such as 'max_objects'. The documentation says to return this same JSON representation, just modified values. However, you must ALSO replace all underscores with hyphens, so 'max_objects' becomes 'max-objects'. Additionally, this should be sent as part of the query string and canonical parameters instead of as a JSON body for the HTTP request.
In this case I believe the appropriate response should be a "400 BAD REQUEST" instead of "501 NOT IMPLEMENTED", since 501 is very misleading.
Also available in: Atom
PDF