<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>I’ve run into a problem with the gnocchi CLI.  Whenever I run ‘gnocchi status’ I get a 403 Forbidden, but I can run other commands like 'gnocchi resource create’ no problem.</div>
<div><br>
</div>
<div>I’ve checked the policy.json and it looks like “admin” has rights to get status, the same as create resources.  I cannot figure out why get status would show a 403 forbidden, but I can run other commands just fine.</div>
<div><br>
</div>
<div>
<div>[root ~] # gnocchi status --debug</div>
<div>REQ: curl -g -i -X GET http://keystone:35357/v3 -H "Accept: application/json" -H "User-Agent: keystoneauth1/2.4.1 python-requests/2.10.0 CPython/2.7.5"</div>
<div>Starting new HTTP connection (1): keystone</div>
<div>"GET /v3 HTTP/1.1" 200 277</div>
<div>RESP: [200] Content-Type: application/json Content-Length: 277 Connection: keep-alive Date: Thu, 23 Feb 2017 16:52:40 GMT Server: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 Vary: X-Auth-Token x-openstack-request-id: req-189a8db8-6210-4735-bc66-b2dc90b00a38</div>
<div>RESP BODY: {"version": {"status": "stable", "updated": "2016-04-04T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.6", "links": [{"href": "http://keystone:35357/v3/", "rel": "self"}]}}</div>
<div><br>
</div>
<div>Making authentication request to http://keystone:35357/v3/auth/tokens</div>
<div>"POST /v3/auth/tokens HTTP/1.1" 201 3874</div>
<div>REQ: curl -g -i -X GET http://gnocchi:8041/v1/status -H "User-Agent: keystoneauth1/2.4.1 python-requests/2.10.0 CPython/2.7.5" -H "Accept: application/json, */*" -H "X-Auth-Token: {SHA1}AAA"</div>
<div>Starting new HTTP connection (1): gnocchi</div>
<div>"GET /v1/status HTTP/1.1" 403 54</div>
<div>RESP: [403] Content-Type: application/json; charset=UTF-8 Content-Length: 54 Connection: keep-alive Server: Werkzeug/0.9.1 Python/2.7.5 Date: Thu, 23 Feb 2017 16:52:40 GMT</div>
<div>RESP BODY: {"code": 403, "description": "", "title": "Forbidden"}</div>
<div><br>
</div>
<div>Forbidden (HTTP 403)</div>
<div>Traceback (most recent call last):</div>
<div>  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 346, in run_subcommand</div>
<div>    result = cmd.run(parsed_args)</div>
<div>  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 79, in run</div>
<div>    column_names, data = self.take_action(parsed_args)</div>
<div>  File "/usr/lib/python2.7/site-packages/gnocchiclient/v1/status_cli.py", line 21, in take_action</div>
<div>    status = self.app.client.status.get()</div>
<div>  File "/usr/lib/python2.7/site-packages/gnocchiclient/v1/status.py", line 21, in get</div>
<div>    return self._get(self.url).json()</div>
<div>  File "/usr/lib/python2.7/site-packages/gnocchiclient/v1/base.py", line 37, in _get</div>
<div>    return self.client.api.get(*args, **kwargs)</div>
<div>  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 173, in get</div>
<div>    return self.request(url, 'GET', **kwargs)</div>
<div>  File "/usr/lib/python2.7/site-packages/gnocchiclient/client.py", line 38, in request</div>
<div>    raise exceptions.from_response(resp, method)</div>
<div>Forbidden: Forbidden (HTTP 403)</div>
<div>Traceback (most recent call last):</div>
<div>  File "/usr/bin/gnocchi", line 10, in <module></div>
<div>    sys.exit(main())</div>
<div>  File "/usr/lib/python2.7/site-packages/gnocchiclient/shell.py", line 211, in main</div>
<div>    return GnocchiShell().run(args)</div>
<div>  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 226, in run</div>
<div>    result = self.run_subcommand(remainder)</div>
<div>  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 346, in run_subcommand</div>
<div>    result = cmd.run(parsed_args)</div>
<div>  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 79, in run</div>
<div>    column_names, data = self.take_action(parsed_args)</div>
<div>  File "/usr/lib/python2.7/site-packages/gnocchiclient/v1/status_cli.py", line 21, in take_action</div>
<div>    status = self.app.client.status.get()</div>
<div>  File "/usr/lib/python2.7/site-packages/gnocchiclient/v1/status.py", line 21, in get</div>
<div>    return self._get(self.url).json()</div>
<div>  File "/usr/lib/python2.7/site-packages/gnocchiclient/v1/base.py", line 37, in _get</div>
<div>    return self.client.api.get(*args, **kwargs)</div>
<div>  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 173, in get</div>
<div>    return self.request(url, 'GET', **kwargs)</div>
<div>  File "/usr/lib/python2.7/site-packages/gnocchiclient/client.py", line 38, in request</div>
<div>    raise exceptions.from_response(resp, method)</div>
<div>gnocchiclient.exceptions.Forbidden: Forbidden (HTTP 403)</div>
</div>
</body>
</html>