yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #22709
[Bug 1204964] Re: 'extra' columns are nullable
I'm pretty sure the only way for this to happen is for someone to muck
with the database directly instead of going through the objects. So even
if the column was not nullable there can still be data in there that
would cause a failure.
The implementation of JsonBlob handles an empty extra field properly. It
effectively boils down to:
>>> from keystone.openstack.common import jsonutils
>>> jsonutils.dumps(None)
'null'
** Changed in: keystone
Status: Triaged => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1204964
Title:
'extra' columns are nullable
Status in OpenStack Identity (Keystone):
Invalid
Bug description:
(keystone.common.wsgi): 2013-07-25 11:13:52,034 ERROR wsgi __call__ expected string or buffer
Traceback (most recent call last):
File "/opt/stack/keystone/keystone/common/wsgi.py", line 240, in __call__
result = method(context, **params)
File "/opt/stack/keystone/keystone/token/controllers.py", line 80, in authenticate
context, auth)
File "/opt/stack/keystone/keystone/token/controllers.py", line 259, in _authenticate_local
user_id, tenant_id)
File "/opt/stack/keystone/keystone/token/controllers.py", line 373, in _get_project_roles_and_ref
user_id, tenant_id)
File "/opt/stack/keystone/keystone/identity/core.py", line 127, in get_roles_for_user_and_project
user_id, tenant_id)
File "/opt/stack/keystone/keystone/assignment/core.py", line 127, in get_roles_for_user_and_project
group_role_list = _get_group_project_roles(user_id, project_ref)
File "/opt/stack/keystone/keystone/assignment/core.py", line 77, in _get_group_project_roles
(user_id=user_id))
File "/opt/stack/keystone/keystone/common/manager.py", line 44, in _wrapper
return f(*args, **kw)
File "/opt/stack/keystone/keystone/identity/backends/sql.py", line 202, in list_groups_for_user
return [self.get_group(x.group_id) for x in membership_refs]
File "/opt/stack/keystone/keystone/identity/backends/sql.py", line 250, in get_group
return self._get_group(session, group_id).to_dict()
File "/opt/stack/keystone/keystone/identity/backends/sql.py", line 243, in _get_group
ref = session.query(Group).get(group_id)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 775, in get
return self._load_on_ident(key)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2512, in _load_on_ident
return q.one()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2184, in one
ret = list(self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2348, in instances
rows = [process[0](row, None) for row in fetch]
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/mapper.py", line 2120, in _instance
populate_state(state, dict_, row, isnew, only_load_props)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/mapper.py", line 1974, in populate_state
populator(state, dict_, row)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py", line 150, in fetch_col
dict_[key] = row[col]
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/types.py", line 662, in process
return process_value(value, dialect)
File "/opt/stack/keystone/keystone/common/sql/core.py", line 146, in process_result_value
return jsonutils.loads(value)
File "/opt/stack/keystone/keystone/openstack/common/jsonutils.py", line 127, in loads
return json.loads(s)
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())
TypeError: expected string or buffer
(access): 2013-07-25 11:13:52,036 INFO core __call__ 192.168.122.94 - - [25/Jul/2013:15:13:52 +0000] "POST http://192.168.122.94:5000/v2.0/tokens HTTP/1.0" 400 88
(eventlet.wsgi.server): 2013-07-25 11:13:52,040 DEBUG wsgi write 192.168.122.94 - - [25/Jul/2013 11:13:52] "POST /v2.0/tokens HTTP/1.1" 400 225 0.038971
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1204964/+subscriptions