keystone commands failing

Bug #1150930 reported by Sina Sadeghi
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Dolph Mathews

Bug Description

Using the Ubuntu Cloud Archive, Ubuntu Precise 12.0.4.2. Testing grizzly repo, manually avoid bugs:

https://bugs.launchpad.net/keystone/+bug/1133608 (manual fix)
and
https://bugs.launchpad.net/keystone/+bug/1131590 (applied Yaguangs patch)

seems to provide a working keystone after updating my keystone.conf based on the default one.

As both a service token and regulat authenticated user I can do:

keystone user-list, keystone tenant-list

but keystone role-list returns

Unable to communicate with identity service: {"error": {"message": "expected string or buffer", "code": 400, "title": "Bad Request"}}. (HTTP 400)

keystone endpoint-list returns

Unable to communicate with identity service: {"error": {"message": "An unexpected error prevented the server from fulfilling your request. 'legacy_endpoint_id'", "code": 500, "title": "Internal Server Error"}}. (HTTP 500)

I also note that if I set my API endpoint to be "/v3" I get the following error for _all_ requests:
Unable to communicate with identity service: {"error": {"message": "%d format: a number is required, not str", "code": 400, "title": "Bad Request"}}. (HTTP 400)

My keystone.conf template shown here:
http://paste.openstack.org/show/32913/

Revision history for this message
Dolph Mathews (dolph) wrote :

There's a separate bug & patch in review for the last issue "%d format: a number is required, not str"

Can you provide backtraces for the first two issues from your logs?

Changed in keystone:
status: New → Incomplete
Revision history for this message
Sina Sadeghi (sina-sa) wrote :

Trace from keystone role-list
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/keystone/common/wsgi.py", line 231, in __call__
    result = method(context, **params)
  File "/usr/lib/python2.7/dist-packages/keystone/identity/controllers.py", line 293, in get_roles
    return {'roles': self.identity_api.list_roles(context)}
  File "/usr/lib/python2.7/dist-packages/keystone/common/manager.py", line 47, in _wrapper
    return f(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/keystone/identity/backends/sql.py", line 981, in list_roles
    refs = session.query(Role).all()
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2115, in all
    return list(self)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2348, in instances
    rows = [process[0](row, None) for row in fetch]
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/mapper.py", line 2120, in _instance
    populate_state(state, dict_, row, isnew, only_load_props)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/mapper.py", line 1974, in populate_state
    populator(state, dict_, row)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py", line 150, in fetch_col
    dict_[key] = row[col]
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/types.py", line 658, in process
    return process_value(impl_processor(value), dialect)
  File "/usr/lib/python2.7/dist-packages/keystone/common/sql/core.py", line 112, in process_result_value
    return jsonutils.loads(value)
  File "/usr/lib/python2.7/dist-packages/keystone/openstack/common/jsonutils.py", line 134, 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

Trace from keystone endpoint-list
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/keystone/common/wsgi.py", line 231, in __call__
    result = method(context, **params)
  File "/usr/lib/python2.7/dist-packages/keystone/catalog/controllers.py", line 61, in get_endpoints
    if not endpoint['legacy_endpoint_id']:
KeyError: 'legacy_endpoint_id'

Changed in keystone:
status: Incomplete → Confirmed
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Medium
milestone: none → grizzly-rc1
assignee: nobody → Dolph Mathews (dolph)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/23925

Changed in keystone:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/23925
Committed: http://github.com/openstack/keystone/commit/31df378f2d95374d6662be11fc6487d01e373f6a
Submitter: Jenkins
Branch: master

commit 31df378f2d95374d6662be11fc6487d01e373f6a
Author: Dolph Mathews <email address hidden>
Date: Fri Mar 8 08:36:30 2013 -0600

    v3 endpoints won't have legacy ID's (bug 1150930)

    Change-Id: I8cc6bac7b0e549db7755df3a993db7d563907324

Changed in keystone:
status: In Progress → Fix Committed
Revision history for this message
Sina Sadeghi (sina-sa) wrote :

Thanks Dolph.

Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: grizzly-rc1 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.