Mismatch between volume and instance permisions

Bug #1061105 reported by Matt Hilt
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
New
Undecided
Unassigned

Bug Description

Using an account with admin privileges, clicking on the Instances & Volumes tab results in a KeyError throw (see below for error traceback).

This does not occur for regular users. I believe it is triggered on my system by a secondary project (that I do not belong to) having an attached volume.

It seems that permission controls on volumes does not match the permission controls on instances. This results in a dictionary of volumes to return values that I shouldn't actually know about, then tries to look up the instance the volume is attached to in a different dictionary that correctly does not contain that instance.

A related feature request would be the ability to have an admin account that can see all volumes and all instances in all projects. If this already exists, can someone point me at it?

========== Traceback ====================

Environment:

Request Method: GET
Request URL: http://essex-cloud/nova/instances_and_volumes/

Django Version: 1.3.1
Python Version: 2.7.3
Installed Applications:
['openstack_dashboard',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django_nose',
 'horizon',
 'horizon.dashboards.nova',
 'horizon.dashboards.syspanel',
 'horizon.dashboards.settings']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'openstack_dashboard.middleware.DashboardLogUnhandledExceptionsMiddleware',
 'horizon.middleware.HorizonMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.locale.LocaleMiddleware')

Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  111. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/decorators.py" in dec
  40. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/decorators.py" in dec
  55. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/decorators.py" in dec
  40. return view_func(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in view
  47. return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py" in dispatch
  68. return handler(request, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/horizon/tables/views.py" in get
  105. handled = self.construct_tables()
File "/usr/lib/python2.7/dist-packages/horizon/tables/views.py" in construct_tables
  96. handled = self.handle_table(table)
File "/usr/lib/python2.7/dist-packages/horizon/tables/views.py" in handle_table
  68. data = self._get_data_dict()
File "/usr/lib/python2.7/dist-packages/horizon/tables/views.py" in _get_data_dict
  37. self._data[table._meta.name] = data_func()
File "/usr/lib/python2.7/dist-packages/horizon/dashboards/nova/instances_and_volumes/views.py" in get_volumes_data
  74. att['instance'] = instances[att['server_id']]

Exception Type: KeyError at /nova/instances_and_volumes/
Exception Value: u'a233fec0-2e87-4660-8ee3-166d3a30a045'

Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

This is a duplicate of https://bugs.launchpad.net/horizon/+bug/1053488 which only affects Essex, and, yes, was due to a flaw in Nova as you pointed out.

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.