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

ceph-rest-api: Various REST API fixes #15910

merged 3 commits into from Jun 27, 2017


None yet
3 participants
Copy link

wido commented Jun 26, 2017

This PR fixes/changes a few things to the (legacy?) REST API. This API is still being used though by people!

  • Set default values
  • Listen on IPv6 addresses
  • Make it easy to run under WSGI

wido added some commits Jun 26, 2017

rest api: Listen on :: (IPv6) instead of
On Linux systems a socket listening on :: also listens on
all IPv4 addresses.

This makes sure the API is usable over IPv6 as well.

Signed-off-by: Wido den Hollander <>
rest api: Set default ceph.conf and id options
This allows for easy execution of the REST API:

  $ /usr/bin/ceph-rest-api

Signed-off-by: Wido den Hollander <>
rest api: Set application variable when not executed as __main__
This allows for using this Python file as a WSGI module as it expects
a variable called application.

Signed-off-by: Wido den Hollander <>

@wido wido added the pybind label Jun 26, 2017

@@ -20,7 +20,7 @@
# Globals and defaults


This comment has been minimized.

Copy link

tchaikov Jun 26, 2017


please note, this is not a Linux specific behavior. werkzeug does not setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY), neither does the builtin SocketServer set this socket option. that's why we have a dual-stack socket when the app is bound to "::".

@tchaikov tchaikov changed the title Various REST API fixes ceph-rest-api: Various REST API fixes Jun 26, 2017

@tchaikov tchaikov added the needs-qa label Jun 26, 2017


This comment has been minimized.

Copy link

liewegas commented Jun 26, 2017

@wido BTW would turning this into a mgr module work for your environment? (We'd welcome patches that do that! :)


This comment has been minimized.

Copy link
Member Author

wido commented Jun 26, 2017

@liewegas: Yes, it probably will!

The API is used in a couple of environments I know for just querying data. The new restful module of the mgr will probably work longer term, but I don't think a lot of people would like to rewrite all their code right now.

As this code is present in the current Luminous RC I just made this PR to keep the things working for now.

A backport of these fixes to Luminous would be very welcome.

@liewegas liewegas merged commit e8fc74d into ceph:master Jun 27, 2017

3 of 4 checks passed

default Build finished.
Signed-off-by all commits in this PR are signed
Unmodified Submodules submodules for project are unmodified
make check make check succeeded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.