Attach volume on a used device

Bug #714684 reported by Édouard Thuleau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Won't Fix
Medium
Unassigned

Bug Description

Attach a volume on a device already used by the system isn't correctly handled.
It's reproducible in the current bazaar branch.

Ubuntu Lucid
Nova Bexar release

Environment:

Request Method: POST
Request URL: http://p-novamaster/project/project1/volumes/attach
Django Version: 1.2.3
Python Version: 2.6.5
Installed Applications:
['dashboard',
 'django.contrib.auth',
 'django.contrib.admin',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.comments',
 'django.contrib.sites',
 'django.contrib.markup',
 'django.contrib.syndication',
 'django_nose',
 'django_nova',
 'registration']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.middleware.doc.XViewMiddleware')

Traceback:
File "/root/openstack-dashboard/trunk/.dashboard-venv/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
  100. response = callback(request, *callback_args, **callback_kwargs)
File "/root/openstack-dashboard/trunk/.dashboard-venv/lib/python2.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  25. return view_func(request, *args, **kwargs)
File "/root/django-nova/trunk/src/django_nova/exceptions.py" in decorator
  90. return func(*args, **kwargs)
File "/root/django-nova/trunk/src/django_nova/views/volumes.py" in attach
  112. form.cleaned_data['device']
File "/root/django-nova/trunk/src/django_nova/exceptions.py" in decorator
  80. raise NovaServerError(e)

Exception Type: NovaServerError at /project/project1/volumes/attach
Exception Value: Bad Request

The Nova-compute log :

2011-02-07 17:01:12,895 AUDIT nova.compute.manager [0ZETSPQNZNGVYD0R48NO user1 project1] instance 7: attaching volume 2 to /dev/vdb
libvir: QEMU error : operation failed: target vdb already exists
2011-02-07 17:01:13,116 ERROR nova.exception [-] Uncaught exception
(nova.exception): TRACE: Traceback (most recent call last):
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.6/nova/exception.py", line 116, in _wrap
(nova.exception): TRACE: return f(*args, **kw)
(nova.exception): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/libvirt_conn.py", line 285, in attach_volume
(nova.exception): TRACE: virt_dom.attachDevice(xml)
(nova.exception): TRACE: File "/usr/lib/python2.6/dist-packages/libvirt.py", line 266, in attachDevice
(nova.exception): TRACE: if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self)
(nova.exception): TRACE: libvirtError: operation failed: target vdb already exists
(nova.exception): TRACE:
2011-02-07 17:01:13,117 ERROR nova.compute.manager [0ZETSPQNZNGVYD0R48NO user1 project1] instance 7: attach failed /dev/vdb, removing
(nova.compute.manager): TRACE: Traceback (most recent call last):
(nova.compute.manager): TRACE: File "/usr/lib/pymodules/python2.6/nova/compute/manager.py", line 531, in attach_volume
(nova.compute.manager): TRACE: mountpoint)
(nova.compute.manager): TRACE: File "/usr/lib/pymodules/python2.6/nova/exception.py", line 122, in _wrap
(nova.compute.manager): TRACE: raise Error(str(e))
(nova.compute.manager): TRACE: Error: operation failed: target vdb already exists
(nova.compute.manager): TRACE:
2011-02-07 17:01:13,140 ERROR nova.root [-] Exception during message handling
(nova.root): TRACE: Traceback (most recent call last):
(nova.root): TRACE: File "/usr/lib/pymodules/python2.6/nova/rpc.py", line 192, in receive
(nova.root): TRACE: rval = node_func(context=ctxt, **node_args)
(nova.root): TRACE: File "/usr/lib/pymodules/python2.6/nova/compute/manager.py", line 92, in decorated_function
(nova.root): TRACE: function(self, context, instance_id, *args, **kwargs)
(nova.root): TRACE: File "/usr/lib/pymodules/python2.6/nova/compute/manager.py", line 544, in attach_volume
(nova.root): TRACE: raise exc
(nova.root): TRACE: Error: operation failed: target vdb already exists
(nova.root): TRACE:

Devin Carlen (devcamcar)
Changed in openstack-dashboard:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Devin Carlen (devcamcar) wrote :

Support for nova volumes is being re-worked based on the OpenStack API and this issue is no longer valid.

Changed in openstack-dashboard:
status: Confirmed → Won't Fix
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.