← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1528877] [NEW] Libvirt can't honour user-supplied dev names

 

Public bug reported:

OpenStack liberty (Ubuntu 14.04)

When creating a new instance via the dashboard and selecting 'boot from
image (creates new volume)' the below is logged into nova-compute.log on
the host the instance is deployed to:

"Ignoring supplied device name: /dev/vda. Libvirt can't honour user-
supplied dev names"

In the virsh XML for the instance I can see the target dev name is sda,
this seems to have changed from how kilo was behaving.

I also noticed that if I then try and add an extra volume to this
instance the below error is placed in the nova-compute.log and the
volume is not attached.

caf420922780362 - - -] Exception during message handling: internal error: unable to execute QEMU command 'device_add': Duplicate ID 'scsi0-0-0-0' for device
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     executor_callback))
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     executor_callback)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     result = func(ctxt, **new_args)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 89, in wrapped
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     payload)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 195, in __exit__
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 72, in wrapped
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     return f(self, context, *args, **kw)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 378, in decorated_function
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     kwargs['instance'], e, sys.exc_info())
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 195, in __exit__
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 366, in decorated_function
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 4609, in attach_volume
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     do_attach_volume(context, instance, driver_bdm)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 254, in inner
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     return f(*args, **kwargs)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 4607, in do_attach_volume
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     bdm.destroy()
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 195, in __exit__
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 4604, in do_attach_volume
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     return self._attach_volume(context, instance, driver_bdm)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 4627, in _attach_volume
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     self.volume_api.unreserve_volume(context, bdm.volume_id)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 195, in __exit__
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 4619, in _attach_volume
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     do_check_attach=False, do_driver_attach=True)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/virt/block_device.py", line 52, in wrapped
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     ret_val = method(obj, context, *args, **kwargs)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/virt/block_device.py", line 265, in attach
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     connector)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 195, in __exit__
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/virt/block_device.py", line 256, in attach
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     device_type=self['device_type'], encryption=encryption)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 1119, in attach_volume
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     self._disconnect_volume(connection_info, disk_dev)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 195, in __exit__
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 1108, in attach_volume
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     guest.attach_device(conf, persistent=True, live=live)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/guest.py", line 233, in attach_device
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     self._domain.attachDeviceFlags(conf.to_xml(), flags=flags)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 183, in doit
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     result = proxy_call(self._autowrap, f, *args, **kwargs)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 141, in proxy_call
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     rv = execute(f, *args, **kwargs)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 122, in execute
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     six.reraise(c, e, tb)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 80, in tworker
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     rv = meth(*args, **kwargs)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 513, in attachDeviceFlags
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     if ret == -1: raise libvirtError ('virDomainAttachDeviceFlags() failed', dom=self)
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher libvirtError: internal error: unable to execute QEMU command 'device_add': Duplicate ID 'scsi0-0-0-0' for device
2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher

** 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/1528877

Title:
  Libvirt can't honour user-supplied dev names

Status in OpenStack Compute (nova):
  New

Bug description:
  OpenStack liberty (Ubuntu 14.04)

  When creating a new instance via the dashboard and selecting 'boot
  from image (creates new volume)' the below is logged into nova-
  compute.log on the host the instance is deployed to:

  "Ignoring supplied device name: /dev/vda. Libvirt can't honour user-
  supplied dev names"

  In the virsh XML for the instance I can see the target dev name is
  sda, this seems to have changed from how kilo was behaving.

  I also noticed that if I then try and add an extra volume to this
  instance the below error is placed in the nova-compute.log and the
  volume is not attached.

  caf420922780362 - - -] Exception during message handling: internal error: unable to execute QEMU command 'device_add': Duplicate ID 'scsi0-0-0-0' for device
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     executor_callback))
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     executor_callback)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     result = func(ctxt, **new_args)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 89, in wrapped
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     payload)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 195, in __exit__
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 72, in wrapped
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     return f(self, context, *args, **kw)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 378, in decorated_function
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     kwargs['instance'], e, sys.exc_info())
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 195, in __exit__
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 366, in decorated_function
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 4609, in attach_volume
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     do_attach_volume(context, instance, driver_bdm)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 254, in inner
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     return f(*args, **kwargs)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 4607, in do_attach_volume
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     bdm.destroy()
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 195, in __exit__
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 4604, in do_attach_volume
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     return self._attach_volume(context, instance, driver_bdm)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 4627, in _attach_volume
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     self.volume_api.unreserve_volume(context, bdm.volume_id)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 195, in __exit__
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 4619, in _attach_volume
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     do_check_attach=False, do_driver_attach=True)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/virt/block_device.py", line 52, in wrapped
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     ret_val = method(obj, context, *args, **kwargs)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/virt/block_device.py", line 265, in attach
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     connector)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 195, in __exit__
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/virt/block_device.py", line 256, in attach
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     device_type=self['device_type'], encryption=encryption)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 1119, in attach_volume
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     self._disconnect_volume(connection_info, disk_dev)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 195, in __exit__
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 1108, in attach_volume
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     guest.attach_device(conf, persistent=True, live=live)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/guest.py", line 233, in attach_device
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     self._domain.attachDeviceFlags(conf.to_xml(), flags=flags)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 183, in doit
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     result = proxy_call(self._autowrap, f, *args, **kwargs)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 141, in proxy_call
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     rv = execute(f, *args, **kwargs)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 122, in execute
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     six.reraise(c, e, tb)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 80, in tworker
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     rv = meth(*args, **kwargs)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 513, in attachDeviceFlags
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher     if ret == -1: raise libvirtError ('virDomainAttachDeviceFlags() failed', dom=self)
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher libvirtError: internal error: unable to execute QEMU command 'device_add': Duplicate ID 'scsi0-0-0-0' for device
  2015-12-23 15:21:55.698 4621 ERROR oslo_messaging.rpc.dispatcher

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


Follow ups