Keyerror when displaying Instances & Volumes

Bug #1053488 reported by Loic Dachary on 2012-09-20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
horizon (Debian)
Fix Released

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/

The corresponding code in horizon/dashboards/nova/instances_and_volumes/ is

            volumes = api.volume_list(self.request)
            instances = SortedDict([(, inst) for inst in
            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

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
Loic Dachary (dachary) wrote :


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 ?


Changed in horizon:
status: Invalid → Confirmed
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
To post a comment you must log in.
This report contains Public information  Edit
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.