Error in display if a volume is created with nova command

Bug #1012045 reported by Vincent Hou
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Critical
Unassigned

Bug Description

How to create the bug:
1. Start with ./stack.sh in devstack.
2. Create a volume with command:
nova volume-create --display_name test 1
3. Visit the link in the browser: http://<IP>/nova/instances_and_volumes/

Expected result:
The webpage should be displayed with the created volume.

Actual Result:
TypeError at /nova/instances_and_volumes/

object of type 'NoneType' has no len()

Request Method: GET
Request URL: http://9.119.148.27/nova/instances_and_volumes/
Django Version: 1.4
Exception Type: TypeError
Exception Value:

object of type 'NoneType' has no len()

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

['/opt/stack/horizon/openstack_dashboard/wsgi/../..',
 '/opt/stack/python-keystoneclient',
 '/opt/stack/python-novaclient',
 '/opt/stack/python-openstackclient',
 '/usr/local/lib/python2.7/dist-packages/cliff-0.7-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/tablib-0.9.11-py2.7.egg',
 '/opt/stack/keystone',
 '/usr/local/lib/python2.7/dist-packages/WebOb-1.0.8-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/pam-0.1.4-py2.7.egg',
 '/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-x86_64.egg',
 '/usr/local/lib/python2.7/dist-packages/boto-2.1.1-py2.7.egg',
 '/opt/stack/nova',
 '/opt/stack/horizon',
 '/opt/stack/python-quantumclient',
 '/opt/stack/quantum',
 '/usr/local/lib/python2.7/dist-packages/python_gflags-1.3-py2.7.egg',
 '/opt/stack/swift',
 '/opt/stack/swift3',
 '/usr/local/lib/python2.7/dist-packages/django_compressor-1.1.2-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/django_appconf-0.5-py2.7.egg',
 '/opt/stack/python-swiftclient',
 '/usr/local/lib/python2.7/dist-packages',
 '/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']

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

                        if len(getattr(volume, 'display_description', '')) > 33:

        ...
    ▶ Local vars

Revision history for this message
koolhead17 (koolhead17) wrote :

Hi Vincent,

Care to provide more details :-

1. Are you using it from trunk or stable/diablo
2. Which distribution your trying to run devstack?

Revision history for this message
Vincent Hou (houshengbo) wrote :

I am using the code from the trunk master and devstack is also from the master.

Devin Carlen (devcamcar)
Changed in horizon:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Nebula (nebula)
milestone: none → folsom-2
Revision history for this message
Tres Henry (tres) wrote :

I believe this should be fixed by: https://review.openstack.org/#/c/8503/

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

Yeah, this is fixed.

Changed in horizon:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: folsom-2 → 2012.2
Curtis Hovey (sinzui)
Changed in horizon:
assignee: Registry Administrators (registry) → nobody
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.