Attaching volume to iso instance is failure because of duplicate device name 'hda'

Solution Unverified - Updated -

Issue

  • Boot instance from ISO image and try to attach cinder volume to the instance. The nova volume-attach command will succeed. But, the operation will fail with following error(nova-compute.log):
[root@controller ~(keystone_admin)]# nova volume-attach rhel7_boot_from_iso 12be458a-a40c-43a8-b87b-33b3eaadc2f9 
+----------+--------------------------------------+
| Property | Value                                |
+----------+--------------------------------------+
| device   | /dev/hda                             |
| id       | 12be458a-a40c-43a8-b87b-33b3eaadc2f9 |
| serverId | 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba |
| volumeId | 12be458a-a40c-43a8-b87b-33b3eaadc2f9 |
+----------+--------------------------------------+

2015-08-17 19:48:00.569 19970 DEBUG nova.volume.cinder [req-05281bfc-8c50-4d18-b060-bd6756a5a016 None] Cinderclient connection created using URL: http://192.168.100.10:8776/v1/d3979f95e8c144e8a7936202a42f929e get_cinder_client_version /usr/lib/python2.7/site-packages/nova/volume/cinder.py:255
2015-08-17 19:48:00.669 19970 ERROR nova.compute.manager [req-05281bfc-8c50-4d18-b060-bd6756a5a016 None] [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba] Failed to attach 12be458a-a40c-43a8-b87b-33b3eaadc2f9 at /dev/hda
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba] Traceback (most recent call last):
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 4606, in _attach_volume
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]     do_check_attach=False, do_driver_attach=True)
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]   File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 46, in wrapped
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]     ret_val = method(obj, context, *args, **kwargs)
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]   File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 261, in attach
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]     connector)
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]   File "/usr/lib/python2.7/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]     six.reraise(self.type_, self.value, self.tb)
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]   File "/usr/lib/python2.7/site-packages/nova/virt/block_device.py", line 252, in attach
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]     device_type=self['device_type'], encryption=encryption)
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1426, in attach_volume
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]     self._disconnect_volume(connection_info, disk_dev)
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]   File "/usr/lib/python2.7/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]     six.reraise(self.type_, self.value, self.tb)
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1415, in attach_volume
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]     virt_dom.attachDeviceFlags(conf.to_xml(), flags)
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]   File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 183, in doit
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]     result = proxy_call(self._autowrap, f, *args, **kwargs)
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]   File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 141, in proxy_call
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]     rv = execute(f, *args, **kwargs)
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]   File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 122, in execute
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]     six.reraise(c, e, tb)
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]   File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 80, in tworker
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]     rv = meth(*args, **kwargs)
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]   File "/usr/lib64/python2.7/site-packages/libvirt.py", line 524, in attachDeviceFlags
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba]     if ret == -1: raise libvirtError ('virDomainAttachDeviceFlags() failed', dom=self)
2015-08-17 19:48:00.669 19970 TRACE nova.compute.manager [instance: 2e2a7ce5-6e4f-43f6-acac-b2270755b1ba] libvirtError: Requested operation is not valid: target hda already exists

Environment

  • Red Hat Open Stack

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content