Project

General

Profile

Bug #37863

Luminous: rgw admin ops via REST returns 501 for routes documented as functional

Added by Keaton Cross about 5 years ago. Updated about 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
rgw
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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?

History

#1 Updated by Keaton Cross about 5 years ago

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?

#2 Updated by Keaton Cross about 5 years ago

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