KeyError at /nova/instances_and_volumes/

Bug #1004412 reported by Edward
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Gabriel Hurley

Bug Description

This weird problem occurs when you login as admin and navigate to "Instance and Volumes" for the first project listed under project panel. Here's the dumped message in browser (see attachment also) :

KeyError at /nova/instances_and_volumes/

u'11913853-89fe-40db-835b-39761132316f'

Request Method: GET
Request URL: http://192.168.156.187/nova/instances_and_volumes/
Django Version: 1.4
Exception Type: KeyError
Exception Value:

u'11913853-89fe-40db-835b-39761132316f'

Exception Location: /opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/dashboards/nova/instances_and_volumes/views.py in get_volumes_data, line 74
Python Executable: /usr/bin/python
Python Version: 2.7.2
Python Path:

['/opt/stack/horizon/openstack_dashboard/wsgi/../..',
 '/opt/stack/python-keystoneclient',
 '/usr/local/lib/python2.7/dist-packages/prettytable-0.5-py2.7.egg',
 '/opt/stack/python-novaclient',
 '/opt/stack/keystone',
 '/usr/local/lib/python2.7/dist-packages/pam-0.1.4-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages',
 '/opt/stack/glance',
 '/usr/local/lib/python2.7/dist-packages/jsonschema-0.2-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/pysendfile-2.0.0-py2.7-linux-i686.egg',
 '/usr/local/lib/python2.7/dist-packages/swift-1.4.8-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/boto-2.1.1-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/SQLAlchemy-0.7.6-py2.7-linux-i686.egg',
 '/opt/stack/nova',
 '/opt/stack/horizon',
 '/opt/stack/python-openstackclient',
 '/usr/local/lib/python2.7/dist-packages/mock-1.0.0alpha1-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/cliff-0.4-py2.7.egg',
 '/opt/stack/python-quantumclient',
 '/opt/stack/quantum',
 '/usr/local/lib/python2.7/dist-packages/python_gflags-1.3-py2.7.egg',
 '/opt/stack/melange',
 '/usr/local/lib/python2.7/dist-packages/factory_boy-1.1.3-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/WebTest-1.3.4-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/kombu-1.5.1-py2.7.egg',
 '/opt/stack/python-melangeclient',
 '/opt/stack/python-glanceclient',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PIL',
 '/usr/lib/python2.7/dist-packages/gst-0.10',
 '/usr/lib/python2.7/dist-packages/gtk-2.0',
 '/usr/lib/pymodules/python2.7',
 '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
 '/usr/lib/python2.7/dist-packages/ubuntuone-client',
 '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
 '/usr/lib/python2.7/dist-packages/ubuntuone-couch',
 '/usr/lib/python2.7/dist-packages/ubuntuone-installer',
 '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol',
 '/opt/stack/horizon/openstack_dashboard']

Server time: Fri, 25 May 2012 18:01:33 +0800
Traceback Switch to copy-and-paste view

    /usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py in get_response

                                response = callback(request, *callback_args, **callback_kwargs)

        ...
    ▶ Local vars
    /opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py in dec

                return view_func(request, *args, **kwargs)

        ...
    ▶ Local vars
    /opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py in dec

                    return view_func(request, *args, **kwargs)

        ...
    ▶ Local vars
    /opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py in dec

                return view_func(request, *args, **kwargs)

        ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/django/views/generic/base.py in view

                    return self.dispatch(request, *args, **kwargs)

        ...
    ▶ Local vars
    /usr/local/lib/python2.7/dist-packages/django/views/generic/base.py in dispatch

                return handler(request, *args, **kwargs)

        ...
    ▶ Local vars
    /opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py in get

                handled = self.construct_tables()

        ...
    ▶ Local vars
    /opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py in construct_tables

                    handled = self.handle_table(table)

        ...
    ▶ Local vars
    /opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py in handle_table

                data = self._get_data_dict()

        ...
    ▶ Local vars
    /opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py in _get_data_dict

                        self._data[table._meta.name] = data_func()

        ...
    ▶ Local vars
    /opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/dashboards/nova/instances_and_volumes/views.py in get_volumes_data

                            att['instance'] = instances[att['server_id']]

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

This is the second time I've heard reports of this problem, and while my best understanding from the previous report is that it seems to be an issue with Nova Volume/Cinder, we could code that bit more defensively to avoid the KeyError just in case.

description: updated
Changed in horizon:
assignee: nobody → Gabriel Hurley (gabriel-hurley)
importance: Undecided → Medium
milestone: none → folsom-2
status: New → Confirmed
Revision history for this message
Edward (zhang-hare) wrote :

To reproduce this bug, make sure to lanch at least one instance. After that, try to switch project and click the "instances and volumes" link.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/8432

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/8432
Committed: http://github.com/openstack/horizon/commit/155bfb72c1b5f866236928f4ffd0c2567dc556f3
Submitter: Jenkins
Branch: master

commit 155bfb72c1b5f866236928f4ffd0c2567dc556f3
Author: Gabriel Hurley <email address hidden>
Date: Mon Jun 11 18:27:00 2012 -0700

    Rollup of volume fixes.

      * Standardizes volume attachment wording.
      * Defensive coding for missing values in attachment dict.
        Fixes bug 1004412 and bug 1004337.
      * Adds polling to Snapshots and Volume Snapshots tables.
        Fixes bug 1005805.
      * Removes an erroneous link on the Volume Snapshots table.
        Fixes bug 1005806.
      * Correts the "type" property on the Images and Snapshots tables.
        Fixes bug 1011910.

    This seems to restore all supported functionality related to volumes using
    devstack master.

    Change-Id: Ie9b7aec06fa1bb7628cd854fb49c02aab14451ea

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: folsom-2 → 2012.2
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.