Project

General

Profile

Actions

Bug #7185

closed

ceph-rest-api inconsistent routing with show_human_help

Added by David Moreau Simard over 10 years ago. Updated about 7 years ago.

Status:
Won't Fix
Priority:
Normal
Assignee:
-
Category:
rest-api
Target version:
-
% Done:

0%

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

Description

This works:
http://apiserver:5000/api/v0.1/osd <-- Returns help for /osd calls
http://apiserver:5000/api/v0.1/osd/ <-- Returns help for /osd calls
http://apiserver:5000/api/v0.1/tell/ <-- Returns help for /tell calls

This doesn't:
http://apiserver:5000/api/v0.1/tell <-- White page (No error in client foreground or in log files)

Logs:

2014-01-19 15:58:00,468 __main__ INFO: http://172.27.57.80:5000/api/v0.1/tell/ from 172.17.66.30 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.29 Safari/537.36
2014-01-19 15:58:00,469 __main__ DEBUG: Accept: ['text/html', 'image/webp', 'application/xhtml+xml', 'application/xml', '*/*']
2014-01-19 15:58:07,017 __main__ INFO: http://172.27.57.80:5000/api/v0.1/tell from 172.17.66.30 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.29 Safari/537.36
2014-01-19 15:58:07,017 __main__ DEBUG: Accept: ['text/html', 'image/webp', 'application/xhtml+xml', 'application/xml', '*/*']

It looks like it is having a hard time with the fact that there are no trailing slashes but it works for other sections of the API.

Actions #1

Updated by David Moreau Simard over 10 years ago

Just noticed there is a rest-api category (I was searching for ceph-rest-api..). Could someone flag this properly ? I don't have permissions to edit.

Actions #2

Updated by Loïc Dachary over 10 years ago

  • Category set to rest-api
Actions #3

Updated by Kai Zhang about 10 years ago

/tell is a command itself:

tell?target=target(<name(type.id)>)&args=args(<string>)[<string>...]    PUT    send a command to a specific daemon

http://apiserver:5000/api/v0.1/tell leads to the above command. However, it expects "PUT" request, so you get the white page in a web browser.
If you try:
curl -i -X PUT localhost:5000/api/v0.1/tell

You can get:
HTTP/1.0 400 BAD REQUEST
Content-Type: text/html; charset=utf-8
Content-Length: 54
Server: Werkzeug/0.8.1 Python/2.7.3
Date: Wed, 22 Jan 2014 20:07:57 GMT

missing required parameter target(<name (type.id)>)

Actions #4

Updated by Sage Weil about 7 years ago

  • Status changed from New to Won't Fix
Actions

Also available in: Atom PDF