Exception in instances and volumes tab

Bug #1055974 reported by Jose Castro Leon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
OpenStack Dashboard (Horizon)
Won't Fix
Undecided
Unassigned

Bug Description

If a user has access to more than one tenant and it has also a volume mounted to an instance.
When retrieving the instances and volumes of another tenant it fails with the exception:

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

Reproducible: always
1. Create Project1
2. Create Project2
3. Assign user as member of Project1
4. Assign user as member of Project2
5. Create instance in Project1
6. Create a volume
7. Attach volume to the instance
8. Change to Project2 and look at Instances & Volumes

Actual Result:
Exception fired

Expected Result:
No error

Revision history for this message
Jose Castro Leon (jose-castro-leon) wrote :

It seems that the volumes are available for all the tenants, and it fails into mapping the volume to the instance which could be mounted on another tenant

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

What version of OpenStack are you using? This shouldn't occur in master/Folsom RC... If it does, it's largely a Nova problem since Nova needs to be sending properly scoped volume data. I thought they'd fixed all these bugs relatively recently, but it'd be good to confirm.

Changed in nova:
status: New → Incomplete
Revision history for this message
Jose Castro Leon (jose-castro-leon) wrote :

I am using Essex right now, I did not check with Folsom RC, but I will do it as soon as possible.

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

Yep, that's what I figured. This is a known problem in Essex Nova (it didn't scope volumes, keypairs, security groups, etc.) to tenants properly and situations like this could result.

It's fixed in Folsom in Nova.

Changed in horizon:
status: New → Won't Fix
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

See comment #4 from Gabriel

Changed in nova:
status: Incomplete → Invalid
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.