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
mgr/dashboard: Implement a RGW proxy #21258
Conversation
retest this please |
I re-tested this on a local branch against the frontend PR proposed in #20869 and it worked as advertised. |
except NoCredentialsException as e: | ||
cherrypy.response.headers['Content-Type'] = 'application/json' | ||
cherrypy.response.status = 401 | ||
return json.dumps({'message': str(e)}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line triggers an exception in cherrypy when running in python 3 because of the return type. Please change this line to:
return json.dumps({'message': str(e)}).encode('utf-8')
The proxy is sending the wrong content-type:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm except for the wrong content type.
return daemon | ||
|
||
|
||
@ApiController('rgw/proxy') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@sebastian-philipp After adapting the RGW proxy controller to #21239 the endpoint 'rgw/proxy' does not exist anymore and you'll get an error message with correct content-type:
|
jenkins retest this please |
5b1a60b
to
6b0ce1c
Compare
81367f3
to
88deec8
Compare
QA tests failed: http://pulpito.ceph.com/rdias-2018-04-10_13:03:34-rados:mgr-wip-rdias-testing-distro-basic-mira/ Teuthology log: http://qa-proxy.ceph.com/teuthology/rdias-2018-04-10_13:03:34-rados:mgr-wip-rdias-testing-distro-basic-mira/2380150/teuthology.log After some investigation with @p-na we found out that the current RGW backend code is assuming that there is alwasy an RGW daemon in the service map with This is the output of the service map of the teuthology run:
|
Just for documentation, the service map using vstart looks like
|
3084293
to
68cb890
Compare
@rjfd The |
ed9f228
to
aac311d
Compare
QA tests run successful: http://pulpito.ceph.com/rdias-2018-04-11_08:29:22-rados:mgr-wip-rdias-testing-distro-basic-mira/ |
This commit will include the `python-requests-aws` [1] library. This library extends the `requests` library by an authentication mechanism to S3 gateways. [1] https://github.com/tax/python-requests-aws Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
This implementation is basically a Rados Gateway reverse proxy. It additionally takes care of the authentication to the Rados Gateway, but to use it you will have to be authenticated against the dashboards RESTful API. The corresponding credentials can be configured using the following commands: dashboard set-rgw-api-secret-key <secret-key> dashboard set-rgw-api-access-key <access-key> Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
Signed-off-by: Volker Theile <vtheile@suse.com>
Addressed by #21258 (comment)
Implement a RGW proxy which can be used by the frontend to talk to the RGW Admin Ops API.
This PR takes over #20799.