Keyerror when displaying Instances & Volumes

Bug #1053488 reported by Loic Dachary
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Invalid
Undecided
Unassigned
Essex
Won't Fix
Medium
Unassigned
horizon (Debian)
Fix Released
Unknown

Bug Description

This is most likely Essex specific because the corresponding code has changed in Folsom.

Steps to reproduce:

    Create the user USER and give it admin privileges
    Make the user a member of tenantA
    Create a volume in tenantB
    Associate the volume to an instance in tenantB
    Login to the dashboard as USER
    Go to the Volume & Instance menu entry
    See the following error message, where the key matches the UUID of the volume.

      KeyError at /nova/instances_and_volumes/
      u'f67c2eb9-9863-44c0-addf-1338233d7b4c'

The corresponding code in horizon/dashboards/nova/instances_and_volumes/views.py is

            volumes = api.volume_list(self.request)
            instances = SortedDict([(inst.id, inst) for inst in
                                    self._get_instances()])
            for volume in volumes:
                for att in volume.attachments:
                    att['instance'] = instances[att['server_id']]

And my first guess is that api.volume_list(self.request) returns all the volumes when the user has admin privileges, while self._get_instances() only returns the instances of the current tenant. When trying to get the instance to which each volume is attached, the lookup fails every time the volume is attached to a tenant that is not the current tenant.

Related branches

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

Yep, this was fixed in the middle of Folsom. Unfortunately I don't have the specific commit handy...

Changed in horizon:
status: New → Invalid
Revision history for this message
Loic Dachary (dachary) wrote :

Hi,

How should I proceed to state that this bug is valid for Essex and should be fixed for the next stable update ? Is there a way to tag this bug report as "Essex" only ?

Cheers

Changed in horizon:
status: Invalid → Confirmed
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

Added the bug to the Essex Horizon series; closing for master.

Changed in horizon:
status: Confirmed → Invalid
Changed in horizon (Debian):
status: Unknown → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/essex)

Fix proposed to branch: stable/essex
Review: https://review.openstack.org/14801

Revision history for this message
Rafi Khardalian (rkhardalian) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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