grafana-gnocchi-datasource icon indicating copy to clipboard operation
grafana-gnocchi-datasource copied to clipboard

Problem when using keystone auth mode and server(proxy) access mode

Open rocasyeh opened this issue 6 years ago • 3 comments

When using token auth mode and server access mode, test operation will get gnocchi resources through grafana server normally. However, if using keystone auth mode, test operation will get token through proxy but get gnocchi resource directly. For example (in one test operation): http://<grafana_ip>:<grafana_port>/api/datasources/proxy/5/v3/auth/tokens http://<gnocchi_ip>:8041/v1/resource

rocasyeh avatar Jan 17 '19 08:01 rocasyeh

btw, keystone's ip and gnocchi's ip are the same

rocasyeh avatar Jan 17 '19 09:01 rocasyeh

@rocasyeh,

I'm seeing the same thing as well. When I do a tcpdump of all traffic from the grafana host to the controller, home of keystone and gnocchi, i only see a successful authentication reply with a token and endpoint catalog. I never see an attempt to the gnocchi api on port 8041. In my case, Cross-Origin Resource Sharing is configured and tested even though is likely not an issue in server access mode.

@sileht Mr. Abaakouk, any thoughts?

ki4rbc avatar Jun 07 '19 21:06 ki4rbc

I can confirm the problem, as well. In proxy mode, parsing the service catalog is of no use as you can only connect to the configured endpoint, anyways. So I replaced the parsing code with a simple:

_this.url = _this.keystone_endpoint;

This makes it work ok for me in proxy mode. It won't work in direct mode, though.

JochenFriedrich avatar Oct 24 '21 08:10 JochenFriedrich