Forbidden response when trying to log-in with demo user in a DevStack deployment

Asked by Victoria Martinez de la Cruz

Hi!

I recently reinstalled my development environment and unfortunately I encountered I couldn't log in to the Dashboard.

That issue was partially covered by this answer - https://answers.launchpad.net/python-novaclient/+question/221653 -, but I'm still having problems with it.

After changing the suggested line, I can log-in as admin user, but when trying to log with demo user I get the following trace

####

Environment:

Request Method: GET
Request URL: http://192.168.1.100/project/

Django Version: 1.4.3
Python Version: 2.7.3
Installed Applications:
['openstack_dashboard',
 'django.contrib.contenttypes',
 'django.contrib.auth',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'compressor',
 'horizon',
 'openstack_dashboard.dashboards.project',
 'openstack_dashboard.dashboards.admin',
 'openstack_dashboard.dashboards.settings',
 'openstack_auth']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'horizon.middleware.HorizonMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.locale.LocaleMiddleware')

Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  111. response = callback(request, *callback_args, **callback_kwargs)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py" in dec
  38. return view_func(request, *args, **kwargs)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py" in dec
  54. return view_func(request, *args, **kwargs)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py" in dec
  38. return view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in view
  48. return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch
  69. return handler(request, *args, **kwargs)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py" in get
  155. handled = self.construct_tables()
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py" in construct_tables
  146. handled = self.handle_table(table)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py" in handle_table
  118. data = self._get_data_dict()
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py" in _get_data_dict
  182. self._data = {self.table_class._meta.name: self.get_data()}
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/dashboards/project/overview/views.py" in get_data
  32. super(ProjectOverview, self).get_data()
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/usage/views.py" in get_data
  33. self.usage.summarize(*self.usage.get_date_range())
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/usage/base.py" in summarize
  98. _('Unable to retrieve usage information.'))
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/usage/base.py" in summarize
  95. self.usage_list = self.get_usage_list(start, end)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/usage/base.py" in get_usage_list
  142. usage = api.nova.usage_get(self.request, self.tenant_id, start, end)
File "/opt/stack/horizon/openstack_dashboard/wsgi/../../openstack_dashboard/api/nova.py" in usage_get
  458. return NovaUsage(novaclient(request).usage.get(tenant_id, start, end))
File "/opt/stack/python-novaclient/novaclient/v1_1/usage.py" in get
  48. "tenant_usage")
File "/opt/stack/python-novaclient/novaclient/base.py" in _get
  140. _resp, body = self.api.client.get(url)
File "/opt/stack/python-novaclient/novaclient/client.py" in get
  227. return self._cs_request(url, 'GET', **kwargs)
File "/opt/stack/python-novaclient/novaclient/client.py" in _cs_request
  214. **kwargs)
File "/opt/stack/python-novaclient/novaclient/client.py" in _time_request
  196. resp, body = self.request(url, method, **kwargs)
File "/opt/stack/python-novaclient/novaclient/client.py" in request
  190. raise exceptions.from_response(resp, body, url, method)

Exception Type: Forbidden at /project/
Exception Value: User does not have admin privileges (HTTP 403) (Request-ID: req-9ad7de9c-f7cf-4ab1-a665-bbbb4bd410e8)

####

Even though it's ok that demo user does not have admin permissions, he should be able to get usage information from the client.

It's a basic DevStack implementation on Ubuntu 12.04 LTS, with Quantum and Swift enabled.

Screen logs looks fine, except from Horizon's one that shows the attached trace, and stack.sh log doesn't show anything weird either.

I'll keep looking for a solution, but any help will be totally appreciated.

Question information

Language:
English Edit question
Status:
Solved
For:
python-novaclient Edit question
Assignee:
No assignee Edit question
Solved by:
Victoria Martinez de la Cruz
Solved:
Last query:
Last reply:
Revision history for this message
Victoria Martinez de la Cruz (vkmc) said :
#1

Related with this bug https://bugs.launchpad.net/nova/+bug/1122267

Luckily, a patch is already submitted

I guess I can call this problem solved :)