yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #90400
[Bug 1177365] Re: Non-JSON policy file causing failure to load policy
We are no longer using JSON policy files, so I'll close this.
** Changed in: glance
Status: Confirmed => Won't Fix
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1177365
Title:
Non-JSON policy file causing failure to load policy
Status in Glance:
Won't Fix
Bug description:
If the file /etc/glance/policy.json is not valid JSON data an
unhandled exception is raised by the JSON decoder.
$ glance image-list
Request returned failure status.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py", line 383, in handle_one_response
result = self.application(self.environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/opt/stack/glance/glance/common/wsgi.py", line 367, in __call__
response = req.get_response(self.application)
File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
application, catch_exc_info=False)
File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
app_iter = application(self.environ, start_response)
File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 451, in __call__
return self.app(env, start_response)
File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
return self.func(req, *args, **kwargs)
File "/opt/stack/glance/glance/common/wsgi.py", line 364, in __call__
response = self.process_request(req)
File "/opt/stack/glance/glance/api/middleware/context.py", line 79, in process_request
req.context = self._get_authenticated_context(req)
File "/opt/stack/glance/glance/api/middleware/context.py", line 125, in _get_authenticated_context
return glance.context.RequestContext(**kwargs)
File "/opt/stack/glance/glance/context.py", line 46, in __init__
self.policy_enforcer.check_is_admin(self)
File "/opt/stack/glance/glance/api/policy.py", line 155, in check_is_admin
return self.check(context, 'context_is_admin', target)
File "/opt/stack/glance/glance/api/policy.py", line 145, in check
return self._check(context, action, target)
File "/opt/stack/glance/glance/api/policy.py", line 115, in _check
self.load_rules()
File "/opt/stack/glance/glance/api/policy.py", line 67, in load_rules
rules = self._read_policy_file()
File "/opt/stack/glance/glance/api/policy.py", line 99, in _read_policy_file
rules_dict = json.loads(raw_contents)
File "/usr/lib/python2.7/json/__init__.py", line 326, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
(HTTP 500)
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1177365/+subscriptions