← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1053488] Re: Keyerror when displaying Instances & Volumes

 

** Changed in: horizon/essex
       Status: In Progress => Won't Fix

** Changed in: horizon/essex
     Assignee: Jiang Yong (jiangy) => (unassigned)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1053488

Title:
  Keyerror when displaying Instances & Volumes

Status in OpenStack Dashboard (Horizon):
  Invalid
Status in OpenStack Dashboard (Horizon) essex series:
  Won't Fix
Status in horizon package in 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/
        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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1053488/+subscriptions