Stuck to attaching when a volume is attached to an instance

Bug #1004337 reported by Vincent Hou
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Critical
Gabriel Hurley

Bug Description

When I try to attach a volume to a running instance from the horizon interface, the status of the volume is stuck to attaching, even though the volume is successfully attached.
When I refresh the page, the status of the volume becomes attached.

Revision history for this message
Vincent Hou (houshengbo) wrote :
Vincent Hou (houshengbo)
description: updated
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

If the spinner is there, it means it's actively fetching new data from Nova/Cinder periodically, and the data coming back still has the "attaching" status. If you want to verify that, set the "console" log level to "DEBUG" in your local_settings.py and watch what gets returned from the API calls in the log.

If you can find that the data coming back does not match what's being reflected in the updates to the table row, please reopen this bug with further details.

Changed in horizon:
status: New → Incomplete
assignee: nobody → Gabriel Hurley (gabriel-hurley)
Revision history for this message
Vincent Hou (houshengbo) wrote :
Download full text (10.5 KiB)

The reason why the status of volume stuck to "attaching" is that there is error raised from the log of horizon, when I attach the volume to an instance.

[Mon May 28 11:50:50 2012] [error] REQ: curl -i http://9.119.148.119:8776/v1/d3e33bd38cac41aa816925488148494c/volumes/b8a69148-44d5-45
f3-8a07-2a9fd3a8e2e9 -X GET -H "X-Auth-Project-Id: d3e33bd38cac41aa816925488148494c" -H "User-Agent: python-novaclient" -H "Accept: ap
plication/json" -H "X-Auth-Token: 59b2eed030e34e9e9c083a3a24c6bcb8"
[Mon May 28 11:50:50 2012] [error]
[Mon May 28 11:50:50 2012] [error] RESP:{'status': '200', 'content-length': '459', 'content-location': u'http://9.119.148.119:8776/v1/
d3e33bd38cac41aa816925488148494c/volumes/b8a69148-44d5-45f3-8a07-2a9fd3a8e2e9', 'x-compute-request-id': 'req-fe2a96e6-191f-4fc9-bfe0-4
8a1754955a9', 'date': 'Mon, 28 May 2012 03:50:50 GMT', 'content-type': 'application/json'} {"volume": {"status": "in-use", "display_na
me": "vol1", "attachments": [{"device": "/dev/vdc", "server_id": "a5d941a3-b0cb-43ed-b5c9-3f9731f071be", "id": "b8a69148-44d5-45f3-8a0
7-2a9fd3a8e2e9", "volume_id": "b8a69148-44d5-45f3-8a07-2a9fd3a8e2e9"}], "availability_zone": "nova", "created_at": "2012-05-28 03:48:2
6", "display_description": "", "volume_type": "None", "snapshot_id": null, "metadata": {}, "id": "b8a69148-44d5-45f3-8a07-2a9fd3a8e2e9
", "size": 1}}
[Mon May 28 11:50:50 2012] [error]
[Mon May 28 11:50:50 2012] [error] CRITICAL:openstack_dashboard:Unhandled Exception in of type "<type 'exceptions.KeyError'>" in dashb
oard.
[Mon May 28 11:50:50 2012] [error] Traceback (most recent call last):
[Mon May 28 11:50:50 2012] [error] File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_resp
onse
[Mon May 28 11:50:50 2012] [error] response = callback(request, *callback_args, **callback_kwargs)
[Mon May 28 11:50:50 2012] [error] File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py", line 40, in dec
[Mon May 28 11:50:50 2012] [error] return view_func(request, *args, **kwargs)
[Mon May 28 11:50:50 2012] [error] File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py", line 55, in dec
[Mon May 28 11:50:50 2012] [error] return view_func(request, *args, **kwargs)
[Mon May 28 11:50:50 2012] [error] File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/decorators.py", line 40, in dec
[Mon May 28 11:50:50 2012] [error] return view_func(request, *args, **kwargs)
[Mon May 28 11:50:50 2012] [error] File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py", line 48, in view
[Mon May 28 11:50:50 2012] [error] return self.dispatch(request, *args, **kwargs)
[Mon May 28 11:50:50 2012] [error] File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py", line 69, in dispatch
[Mon May 28 11:50:50 2012] [error] return handler(request, *args, **kwargs)
[Mon May 28 11:50:50 2012] [error] File "/opt/stack/horizon/openstack_dashboard/wsgi/../../horizon/tables/views.py", line 105, in ge
t
[Mon May 28 11:50:50 2012] [error] handled = self.construct_tables()
[Mon May 28 11:50:50 2012] [error] File "/opt/stack/horizon/openstack_da...

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

There's something clearly wrong with how data is being returned from nova volume lately. This is the third report that end in a similar issue (though in different spots in the code). Related: https://bugs.launchpad.net/horizon/+bug/1004412

This needs to be investigated and fixed ASAP.

Changed in horizon:
importance: Undecided → Critical
milestone: none → folsom-2
status: New → Confirmed
Changed in horizon:
status: Confirmed → In Progress
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

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.