When I do senlin profile-list, I got a error like following:
Traceback (most recent call last):
File \"/opt/stack/senlin/senlin/api/middleware/fault.py\", line 141, in process_request
return req.get_response(self.application)
File \"/usr/lib/python2.7/site-packages/webob/request.py\", line 1317, in send
application, catch_exc_info=False)
File \"/usr/lib/python2.7/site-packages/webob/request.py\", line 1281, in call_application
app_iter = application(self.environ, start_response)
File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 195, in call_func
return self.func(req, *args, **kwargs)
File \"/opt/stack/senlin/senlin/common/wsgi.py\", line 306, in __call__
response = req.get_response(self.application)
File \"/usr/lib/python2.7/site-packages/webob/request.py\", line 1317, in send
application, catch_exc_info=False)
File \"/usr/lib/python2.7/site-packages/webob/request.py\", line 1281, in call_application
app_iter = application(self.environ, start_response)
File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 195, in call_func
return self.func(req, *args, **kwargs)
File \"/opt/stack/senlin/senlin/common/wsgi.py\", line 306, in __call__
response = req.get_response(self.application)
File \"/usr/lib/python2.7/site-packages/webob/request.py\", line 1317, in send
application, catch_exc_info=False)
File \"/usr/lib/python2.7/site-packages/webob/request.py\", line 1281, in call_application
app_iter = application(self.environ, start_response)
File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 195, in call_func
return self.func(req, *args, **kwargs)
File \"/opt/stack/senlin/senlin/common/wsgi.py\", line 306, in __call__
response = req.get_response(self.application)
File \"/usr/lib/python2.7/site-packages/webob/request.py\", line 1317, in send
application, catch_exc_info=False)
File \"/usr/lib/python2.7/site-packages/webob/request.py\", line 1281, in call_application
app_iter = application(self.environ, start_response)
File \"/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py\", line 634, in __call__
return self._call_app(env, start_response)
File \"/usr/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py\", line 554, in _call_app
return self._app(env, _fake_start_response)
File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 195, in call_func
return self.func(req, *args, **kwargs)
File \"/opt/stack/senlin/senlin/common/wsgi.py\", line 306, in __call__
response = req.get_response(self.application)
File \"/usr/lib/python2.7/site-packages/webob/request.py\", line 1317, in send
application, catch_exc_info=False)
File \"/usr/lib/python2.7/site-packages/webob/request.py\", line 1281, in call_application
app_iter = application(self.environ, start_response)
File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 130, in __call__
resp = self.call_func(req, *args, **self.kwargs)
File \"/usr/lib/python2.7/site-packages/webob/dec.py\", line 195, in call_func
return self.func(req, *args, **kwargs)
File \"/opt/stack/senlin/senlin/common/wsgi.py\", line 303, in __call__
response = self.process_request(req)
File \"/opt/stack/senlin/senlin/api/middleware/trust.py\", line 115, in process_request
trust_id = self._get_trust(req.context)
File \"/opt/stack/senlin/senlin/api/middleware/trust.py\", line 72, in _get_trust
admin_id = self._get_service_user_id(ctx)
File \"/opt/stack/senlin/senlin/api/middleware/trust.py\", line 49, in _get_service_user_id
admin_id = kc.user_get_by_name(admin_user)
File \"/opt/stack/senlin/senlin/drivers/openstack/keystone_v3.py\", line 55, in user_get_by_name
user = self.conn.identity.find_user(user_name)
File \"/usr/lib/python2.7/site-packages/openstack/identity/v3/_proxy.py\", line 542, in find_user
return user.User.find(self.session, name_or_id)
File \"/usr/lib/python2.7/site-packages/openstack/resource.py\", line 922, in find
info = cls.page(session, limit=2, **args)
File \"/usr/lib/python2.7/site-packages/openstack/resource.py\", line 894, in page
resp = session.get(url, service=cls.service, params=params).body
File \"/usr/lib/python2.7/site-packages/openstack/session.py\", line 142, in get
return self._request(path, 'GET', **kwargs)
File \"/usr/lib/python2.7/site-packages/openstack/session.py\", line 123, in _request
token = self.authenticator.get_token(self.transport)
File \"/usr/lib/python2.7/site-packages/openstack/auth/identity/base.py\", line 70, in get_token
return self.get_access(transport).auth_token
File \"/usr/lib/python2.7/site-packages/openstack/auth/identity/base.py\", line 109, in get_access
self.access_info = self.authorize(transport)
File \"/usr/lib/python2.7/site-packages/openstack/auth/identity/discoverable.py\", line 84, in authorize
return self.auth_plugin.authorize(transport, **kwargs)
File \"/usr/lib/python2.7/site-packages/openstack/auth/identity/v3.py\", line 148, in authorize
**resp_data)
File \"/usr/lib/python2.7/site-packages/openstack/auth/access.py\", line 417, in __init__
self.service_catalog = catalog.ServiceCatalog(self._info['catalog'])
KeyError: 'catalog'
I believe following lines causing this problem.
https://github.com/stackforge/senlin/blob/9c14bb6d6050fada49bb419f74b64c45268515d2/senlin/api/middleware/trust.py#L38-L49
When trying to find a user id from user name, we need to use a token with 'catalog', but if lacking of 'project_name' and 'project_domain_name' in params, return token didn't contain key 'catalog'. Will fail with KeyError catalog.
Reviewed: https:/ /review. openstack. org/186006 /git.openstack. org/cgit/ stackforge/ senlin/ commit/ ?id=4c9ff23b3bf 64a6d19635bb0d4 bdf8fdd0d41f53
Committed: https:/
Submitter: Jenkins
Branch: master
commit 4c9ff23b3bf64a6 d19635bb0d4bdf8 fdd0d41f53
Author: Ethan Lynn <email address hidden>
Date: Wed May 27 22:00:35 2015 +0800
Fix catalog error when finding user_id from user_name
Fix catalog error when finding user_id from user_name
Change-Id: I994aae02f70318 6c7c15d7b867513 93dc09367c4
Closes-Bug: #1459258