← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1362842] [NEW] Can't re-attach volumes to instances

 

Public bug reported:

When detaching a volume from an instance, and then re-attaching that
same volume to that same instance nova fails to attach.

Error:
2014-08-28 13:36:02.134 ERROR nova.virt.block_device [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] Driver failed to attach volume a2439dd9-49ef-4ce0-8b91-155ff6ecd3b0 at /dev/vdb
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] Traceback (most recent call last):
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/block_device.py", line 252, in attach
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     device_type=self['device_type'], encryption=encryption)
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1315, in attach_volume
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     self._disconnect_volume(connection_info, disk_dev)
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     six.reraise(self.type_, self.value, self.tb)
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1306, in attach_volume
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     virt_dom.attachDeviceFlags(conf.to_xml(), flags)
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 179, in doit
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     result = proxy_call(self._autowrap, f, *args, **kwargs)
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 139, in proxy_call
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     rv = execute(f,*args,**kwargs)
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 77, in tworker
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     rv = meth(*args,**kwargs)
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 420, in attachDeviceFlags
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     if ret == -1: raise libvirtError ('virDomainAttachDeviceFlags() failed', dom=self)
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] libvirtError: internal error unable to execute QEMU command 'device_add': Duplicate ID 'virtio-disk1' for device
2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] 
2014-08-28 13:36:02.136 DEBUG nova.volume.cinder [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Cinderclient connection created using URL: http://10.50.142.1:8776/v1/a7b96ab31ea340ff8a6c900c7b3449ba from (pid=36738) get_cinder_client_version /opt/stack/nova/nova/volume/cinder.py:238
2014-08-28 13:36:02.748 ERROR nova.compute.manager [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] Failed to attach a2439dd9-49ef-4ce0-8b91-155ff6ecd3b0 at /dev/vdb
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] Traceback (most recent call last):
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/compute/manager.py", line 4368, in _attach_volume
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     do_check_attach=False, do_driver_attach=True)
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/block_device.py", line 46, in wrapped
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     ret_val = method(obj, context, *args, **kwargs)
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/block_device.py", line 261, in attach
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     connector)
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     six.reraise(self.type_, self.value, self.tb)
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/block_device.py", line 252, in attach
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     device_type=self['device_type'], encryption=encryption)
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1315, in attach_volume
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     self._disconnect_volume(connection_info, disk_dev)
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     six.reraise(self.type_, self.value, self.tb)
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1306, in attach_volume
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     virt_dom.attachDeviceFlags(conf.to_xml(), flags)
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 179, in doit
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     result = proxy_call(self._autowrap, f, *args, **kwargs)
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 139, in proxy_call
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     rv = execute(f,*args,**kwargs)
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 77, in tworker
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     rv = meth(*args,**kwargs)
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 420, in attachDeviceFlags
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     if ret == -1: raise libvirtError ('virDomainAttachDeviceFlags() failed', dom=self)
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] libvirtError: internal error unable to execute QEMU command 'device_add': Duplicate ID 'virtio-disk1' for device
2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] 
2014-08-28 13:36:02.750 DEBUG nova.volume.cinder [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Cinderclient connection created using URL: http://10.50.142.1:8776/v1/a7b96ab31ea340ff8a6c900c7b3449ba from (pid=36738) get_cinder_client_version /opt/stack/nova/nova/volume/cinder.py:238
2014-08-28 13:36:02.888 DEBUG nova.openstack.common.lockutils [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Got semaphore "compute_resources" from (pid=36738) internal_lock /opt/stack/nova/nova/openstack/common/lockutils.py:263
2014-08-28 13:36:02.888 DEBUG nova.openstack.common.lockutils [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Got semaphore / lock "update_usage" from (pid=36738) inner /opt/stack/nova/nova/openstack/common/lockutils.py:324
2014-08-28 13:36:02.914 DEBUG nova.openstack.common.lockutils [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Released semaphore "compute_resources" from (pid=36738) lock /opt/stack/nova/nova/openstack/common/lockutils.py:291
2014-08-28 13:36:02.914 DEBUG nova.openstack.common.lockutils [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Semaphore / lock released "update_usage" from (pid=36738) inner /opt/stack/nova/nova/openstack/common/lockutils.py:328
2014-08-28 13:36:02.917 ERROR oslo.messaging.rpc.dispatcher [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Exception during message handling: internal error unable to execute QEMU command 'device_add': Duplicate ID 'virtio-disk1' for device
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     incoming.message))
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     return self._do_dispatch(endpoint, method, ctxt, args)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     result = getattr(endpoint, method)(ctxt, **new_args)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 412, in decorated_function
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/exception.py", line 88, in wrapped
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     payload)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/exception.py", line 71, in wrapped
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     return f(self, context, *args, **kw)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 296, in decorated_function
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     pass
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 282, in decorated_function
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 324, in decorated_function
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     kwargs['instance'], e, sys.exc_info())
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 312, in decorated_function
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 4358, in attach_volume
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     bdm.destroy(context)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 4355, in attach_volume
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     return self._attach_volume(context, instance, driver_bdm)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 4376, in _attach_volume
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     self.volume_api.unreserve_volume(context, bdm.volume_id)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 4368, in _attach_volume
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     do_check_attach=False, do_driver_attach=True)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/virt/block_device.py", line 46, in wrapped
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     ret_val = method(obj, context, *args, **kwargs)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/virt/block_device.py", line 261, in attach
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     connector)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/virt/block_device.py", line 252, in attach
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     device_type=self['device_type'], encryption=encryption)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1315, in attach_volume
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     self._disconnect_volume(connection_info, disk_dev)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1306, in attach_volume
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     virt_dom.attachDeviceFlags(conf.to_xml(), flags)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 179, in doit
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     result = proxy_call(self._autowrap, f, *args, **kwargs)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 139, in proxy_call
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     rv = execute(f,*args,**kwargs)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 77, in tworker
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     rv = meth(*args,**kwargs)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 420, in attachDeviceFlags
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     if ret == -1: raise libvirtError ('virDomainAttachDeviceFlags() failed', dom=self)
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher libvirtError: internal error unable to execute QEMU command 'device_add': Duplicate ID 'virtio-disk1' for device
2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher 
2014-08-28 13:36:02.921 ERROR oslo.messaging._drivers.common [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Returning exception internal error unable to execute QEMU command 'device_add': Duplicate ID 'virtio-disk1' for device to caller
2014-08-28 13:36:02.922 ERROR oslo.messaging._drivers.common [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] ['Traceback (most recent call last):\n', '  File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply\n    incoming.message))\n', '  File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch\n    return self._do_dispatch(endpoint, method, ctxt, args)\n', '  File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch\n    result = getattr(endpoint, method)(ctxt, **new_args)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 412, in decorated_function\n    return function(self, context, *args, **kwargs)\n', '  File "/opt/stack/nova/nova/exception.py", line 88, in wrapped\n    payload)\n', '  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/nova/nova/exception.py", line 71, in wrapped\n    return f(self, context, *args, **kw)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 296, in decorated_function\n    pass\n', '  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 282, in decorated_function\n    return function(self, context, *args, **kwargs)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 324, in decorated_function\n    kwargs[\'instance\'], e, sys.exc_info())\n', '  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 312, in decorated_function\n    return function(self, context, *args, **kwargs)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 4358, in attach_volume\n    bdm.destroy(context)\n', '  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 4355, in attach_volume\n    return self._attach_volume(context, instance, driver_bdm)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 4376, in _attach_volume\n    self.volume_api.unreserve_volume(context, bdm.volume_id)\n', '  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 4368, in _attach_volume\n    do_check_attach=False, do_driver_attach=True)\n', '  File "/opt/stack/nova/nova/virt/block_device.py", line 46, in wrapped\n    ret_val = method(obj, context, *args, **kwargs)\n', '  File "/opt/stack/nova/nova/virt/block_device.py", line 261, in attach\n    connector)\n', '  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/nova/nova/virt/block_device.py", line 252, in attach\n    device_type=self[\'device_type\'], encryption=encryption)\n', '  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1315, in attach_volume\n    self._disconnect_volume(connection_info, disk_dev)\n', '  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1306, in attach_volume\n    virt_dom.attachDeviceFlags(conf.to_xml(), flags)\n', '  File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 179, in doit\n    result = proxy_call(self._autowrap, f, *args, **kwargs)\n', '  File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 139, in proxy_call\n    rv = execute(f,*args,**kwargs)\n', '  File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 77, in tworker\n    rv = meth(*args,**kwargs)\n', '  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 420, in attachDeviceFlags\n    if ret == -1: raise libvirtError (\'virDomainAttachDeviceFlags() failed\', dom=self)\n', "libvirtError: internal error unable to execute QEMU command 'device_add': Duplicate ID 'virtio-disk1' for device\n"]

** Affects: nova
     Importance: Undecided
         Status: New

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

Title:
  Can't re-attach volumes to instances

Status in OpenStack Compute (Nova):
  New

Bug description:
  When detaching a volume from an instance, and then re-attaching that
  same volume to that same instance nova fails to attach.

  Error:
  2014-08-28 13:36:02.134 ERROR nova.virt.block_device [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] Driver failed to attach volume a2439dd9-49ef-4ce0-8b91-155ff6ecd3b0 at /dev/vdb
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] Traceback (most recent call last):
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/block_device.py", line 252, in attach
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     device_type=self['device_type'], encryption=encryption)
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1315, in attach_volume
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     self._disconnect_volume(connection_info, disk_dev)
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     six.reraise(self.type_, self.value, self.tb)
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1306, in attach_volume
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     virt_dom.attachDeviceFlags(conf.to_xml(), flags)
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 179, in doit
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     result = proxy_call(self._autowrap, f, *args, **kwargs)
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 139, in proxy_call
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     rv = execute(f,*args,**kwargs)
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 77, in tworker
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     rv = meth(*args,**kwargs)
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 420, in attachDeviceFlags
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     if ret == -1: raise libvirtError ('virDomainAttachDeviceFlags() failed', dom=self)
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] libvirtError: internal error unable to execute QEMU command 'device_add': Duplicate ID 'virtio-disk1' for device
  2014-08-28 13:36:02.134 TRACE nova.virt.block_device [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] 
  2014-08-28 13:36:02.136 DEBUG nova.volume.cinder [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Cinderclient connection created using URL: http://10.50.142.1:8776/v1/a7b96ab31ea340ff8a6c900c7b3449ba from (pid=36738) get_cinder_client_version /opt/stack/nova/nova/volume/cinder.py:238
  2014-08-28 13:36:02.748 ERROR nova.compute.manager [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] Failed to attach a2439dd9-49ef-4ce0-8b91-155ff6ecd3b0 at /dev/vdb
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] Traceback (most recent call last):
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/compute/manager.py", line 4368, in _attach_volume
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     do_check_attach=False, do_driver_attach=True)
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/block_device.py", line 46, in wrapped
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     ret_val = method(obj, context, *args, **kwargs)
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/block_device.py", line 261, in attach
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     connector)
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     six.reraise(self.type_, self.value, self.tb)
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/block_device.py", line 252, in attach
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     device_type=self['device_type'], encryption=encryption)
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1315, in attach_volume
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     self._disconnect_volume(connection_info, disk_dev)
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     six.reraise(self.type_, self.value, self.tb)
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1306, in attach_volume
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     virt_dom.attachDeviceFlags(conf.to_xml(), flags)
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 179, in doit
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     result = proxy_call(self._autowrap, f, *args, **kwargs)
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 139, in proxy_call
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     rv = execute(f,*args,**kwargs)
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 77, in tworker
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     rv = meth(*args,**kwargs)
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 420, in attachDeviceFlags
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f]     if ret == -1: raise libvirtError ('virDomainAttachDeviceFlags() failed', dom=self)
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] libvirtError: internal error unable to execute QEMU command 'device_add': Duplicate ID 'virtio-disk1' for device
  2014-08-28 13:36:02.748 TRACE nova.compute.manager [instance: b813c603-6dad-44bd-acdb-76f1fd84899f] 
  2014-08-28 13:36:02.750 DEBUG nova.volume.cinder [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Cinderclient connection created using URL: http://10.50.142.1:8776/v1/a7b96ab31ea340ff8a6c900c7b3449ba from (pid=36738) get_cinder_client_version /opt/stack/nova/nova/volume/cinder.py:238
  2014-08-28 13:36:02.888 DEBUG nova.openstack.common.lockutils [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Got semaphore "compute_resources" from (pid=36738) internal_lock /opt/stack/nova/nova/openstack/common/lockutils.py:263
  2014-08-28 13:36:02.888 DEBUG nova.openstack.common.lockutils [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Got semaphore / lock "update_usage" from (pid=36738) inner /opt/stack/nova/nova/openstack/common/lockutils.py:324
  2014-08-28 13:36:02.914 DEBUG nova.openstack.common.lockutils [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Released semaphore "compute_resources" from (pid=36738) lock /opt/stack/nova/nova/openstack/common/lockutils.py:291
  2014-08-28 13:36:02.914 DEBUG nova.openstack.common.lockutils [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Semaphore / lock released "update_usage" from (pid=36738) inner /opt/stack/nova/nova/openstack/common/lockutils.py:328
  2014-08-28 13:36:02.917 ERROR oslo.messaging.rpc.dispatcher [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Exception during message handling: internal error unable to execute QEMU command 'device_add': Duplicate ID 'virtio-disk1' for device
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     incoming.message))
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     return self._do_dispatch(endpoint, method, ctxt, args)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     result = getattr(endpoint, method)(ctxt, **new_args)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 412, in decorated_function
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/exception.py", line 88, in wrapped
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     payload)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/exception.py", line 71, in wrapped
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     return f(self, context, *args, **kw)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 296, in decorated_function
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     pass
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 282, in decorated_function
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 324, in decorated_function
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     kwargs['instance'], e, sys.exc_info())
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 312, in decorated_function
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 4358, in attach_volume
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     bdm.destroy(context)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 4355, in attach_volume
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     return self._attach_volume(context, instance, driver_bdm)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 4376, in _attach_volume
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     self.volume_api.unreserve_volume(context, bdm.volume_id)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/compute/manager.py", line 4368, in _attach_volume
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     do_check_attach=False, do_driver_attach=True)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/virt/block_device.py", line 46, in wrapped
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     ret_val = method(obj, context, *args, **kwargs)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/virt/block_device.py", line 261, in attach
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     connector)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/virt/block_device.py", line 252, in attach
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     device_type=self['device_type'], encryption=encryption)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1315, in attach_volume
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     self._disconnect_volume(connection_info, disk_dev)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1306, in attach_volume
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     virt_dom.attachDeviceFlags(conf.to_xml(), flags)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 179, in doit
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     result = proxy_call(self._autowrap, f, *args, **kwargs)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 139, in proxy_call
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     rv = execute(f,*args,**kwargs)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 77, in tworker
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     rv = meth(*args,**kwargs)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 420, in attachDeviceFlags
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher     if ret == -1: raise libvirtError ('virDomainAttachDeviceFlags() failed', dom=self)
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher libvirtError: internal error unable to execute QEMU command 'device_add': Duplicate ID 'virtio-disk1' for device
  2014-08-28 13:36:02.917 TRACE oslo.messaging.rpc.dispatcher 
  2014-08-28 13:36:02.921 ERROR oslo.messaging._drivers.common [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] Returning exception internal error unable to execute QEMU command 'device_add': Duplicate ID 'virtio-disk1' for device to caller
  2014-08-28 13:36:02.922 ERROR oslo.messaging._drivers.common [req-79e463d4-7e6d-4fce-8b04-e98de64d91a7 admin admin] ['Traceback (most recent call last):\n', '  File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply\n    incoming.message))\n', '  File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch\n    return self._do_dispatch(endpoint, method, ctxt, args)\n', '  File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch\n    result = getattr(endpoint, method)(ctxt, **new_args)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 412, in decorated_function\n    return function(self, context, *args, **kwargs)\n', '  File "/opt/stack/nova/nova/exception.py", line 88, in wrapped\n    payload)\n', '  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/nova/nova/exception.py", line 71, in wrapped\n    return f(self, context, *args, **kw)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 296, in decorated_function\n    pass\n', '  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 282, in decorated_function\n    return function(self, context, *args, **kwargs)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 324, in decorated_function\n    kwargs[\'instance\'], e, sys.exc_info())\n', '  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 312, in decorated_function\n    return function(self, context, *args, **kwargs)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 4358, in attach_volume\n    bdm.destroy(context)\n', '  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 4355, in attach_volume\n    return self._attach_volume(context, instance, driver_bdm)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 4376, in _attach_volume\n    self.volume_api.unreserve_volume(context, bdm.volume_id)\n', '  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/nova/nova/compute/manager.py", line 4368, in _attach_volume\n    do_check_attach=False, do_driver_attach=True)\n', '  File "/opt/stack/nova/nova/virt/block_device.py", line 46, in wrapped\n    ret_val = method(obj, context, *args, **kwargs)\n', '  File "/opt/stack/nova/nova/virt/block_device.py", line 261, in attach\n    connector)\n', '  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/nova/nova/virt/block_device.py", line 252, in attach\n    device_type=self[\'device_type\'], encryption=encryption)\n', '  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1315, in attach_volume\n    self._disconnect_volume(connection_info, disk_dev)\n', '  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__\n    six.reraise(self.type_, self.value, self.tb)\n', '  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1306, in attach_volume\n    virt_dom.attachDeviceFlags(conf.to_xml(), flags)\n', '  File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 179, in doit\n    result = proxy_call(self._autowrap, f, *args, **kwargs)\n', '  File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 139, in proxy_call\n    rv = execute(f,*args,**kwargs)\n', '  File "/usr/local/lib/python2.7/dist-packages/eventlet/tpool.py", line 77, in tworker\n    rv = meth(*args,**kwargs)\n', '  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 420, in attachDeviceFlags\n    if ret == -1: raise libvirtError (\'virDomainAttachDeviceFlags() failed\', dom=self)\n', "libvirtError: internal error unable to execute QEMU command 'device_add': Duplicate ID 'virtio-disk1' for device\n"]

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


Follow ups

References