endpoint-list with TemplatedCatalog backend raises AttributeError

Bug #954087 reported by Jay Pipes
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Critical
Adam Gandelman

Bug Description

jpipes@librebox:~/repos/devstack$ keystone --username=admin --password=pass endpoint-list
No handlers could be found for logger "keystoneclient.client"
Unable to communicate with identity service: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 203, in __call__
    return app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/keystone/keystone/common/wsgi.py", line 284, in __call__
    response = request.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1053, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/keystone/keystone/common/wsgi.py", line 284, in __call__
    response = request.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1053, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/keystone/keystone/common/wsgi.py", line 284, in __call__
    response = request.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1053, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/keystone/keystone/common/wsgi.py", line 284, in __call__
    response = request.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1053, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/keystone/keystone/common/wsgi.py", line 307, in __call__
    resp = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1053, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1022, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.7/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/pymodules/python2.7/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/keystone/keystone/common/wsgi.py", line 181, in __call__
    result = method(context, **params)
  File "/opt/stack/keystone/keystone/catalog/core.py", line 88, in get_endpoints
    endpoint_list = self.catalog_api.list_endpoints(context)
  File "/opt/stack/keystone/keystone/common/manager.py", line 44, in __getattr__
    f = getattr(self.driver, name)
AttributeError: 'TemplatedCatalog' object has no attribute 'list_endpoints'
. (HTTP 500)

Revision history for this message
Kevin Jackson (kevin-linuxservices) wrote :

Ubuntu 12.04 B1
Adding services with this set

[catalog]
driver = keystone.catalog.backends.sql.Catalog

brings back a list of services...
root@openstack1:~/OpenStackInstaller# keystone --username=admin --password=openstack service-list
+----------------------------------+----------+--------------+----------------------------+
| id | name | type | description |
+----------------------------------+----------+--------------+----------------------------+
| 329f0a467efa48febdd0f210c0af47db | nova | compute | OpenStack Compute Service |
| 7dd5cc6276c44a69abf0d85d84a71587 | ec2 | ec2 | EC2 Service |
| 9948fccc163741acb5e6c7b990b43ea9 | swift | object-store | OpenStack Storage Service |
| a4023c8677a441f983716e645ee6dbab | glance | image | OpenStack Image Service |
| a67056ee10e74750897d3d2f4defa280 | volume | volume | Volume Service |
| c361985729164c1cb248f53d3e8a4d76 | keystone | identity | OpenStack Identity Service |
+----------------------------------+----------+--------------+----------------------------+

It appears not under devstack configs.

Revision history for this message
Joseph Heck (heckj) wrote :

with templatedCatalog, should be returning NotImplementedError at least, not an AttributeError

Changed in keystone:
status: New → Confirmed
importance: Undecided → Critical
milestone: none → essex-rc1
Changed in keystone:
assignee: nobody → Adam Gandelman (gandelman-a)
status: Confirmed → In Progress
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/5305

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/5305
Committed: http://github.com/openstack/keystone/commit/9363d5fea676e1e083c5afe5287ef30c806046bf
Submitter: Jenkins
Branch: master

commit 9363d5fea676e1e083c5afe5287ef30c806046bf
Author: Adam Gandelman <email address hidden>
Date: Tue Mar 13 16:23:45 2012 -0700

    Properly return 501 for unsupported Catalog calls

    Similar to the other APIs, this creates a Driver class that describes
    expected functionality of the catalog driver and raises NotImplemented
    accordingly. NotImplementedError()'s are caught and returned as proper
    501s instead of AttributeErrors.

    Also fixes some inconsistent paramters names in the sql backend.

    Fixes bug 954087

    Update: Convert usage of NotImplementedError() to new
            keystone.exception.NotImplemented() for all
            unimplemented driver actions.

    Change-Id: I69d8e21a6f651e69b724ec5ed5784645bad80c00

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

Other bug subscribers

Remote bug watches

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