Drive created with duplicate ID
My setup :
- OS : Debian 9 (stretch)
- Openstack version : 14.0.0 (Newton)
- Installation method : I've used the "OpenStack Installation Tutorial for Debian" from Openstack documentation (https://docs.openstack.org/newton/install-guide-debian/ (https://docs.openstack.org/newton/ins...))
- Virtualization type : nova-compute (KVM with libvirt driver)
My problem : When a compute node launch an instance with two disks (Ephemeral + Block Storage (cinder)), the second disk is created with the same ID. I use SCSI/IDE (same problem) disks instead of Virtio because the host OS do not supports Virtio controllers.
nova-compute.log displays :
2017-08-31 12:24:57.796 6400 WARNING nova.virt.libvirt.driver [req-2976c1ad-dafb-4523-8ddc-a9c976037e5c 8f1291e9e8e49ac901f45e713bb7fd2e346ff2a7f2464565a7a2db0f7fa8e46e 84a37787811d4412a62911dd5aeaf343 - - -] [instance: e92e8e3f-e684-4600-82d6-a64c9b3e7b73] Ignoring supplied device name: /dev/sda. Libvirt can't honour user-supplied dev names
2017-08-31 12:24:57.797 6400 WARNING nova.virt.libvirt.driver [req-2976c1ad-dafb-4523-8ddc-a9c976037e5c 8f1291e9e8e49ac901f45e713bb7fd2e346ff2a7f2464565a7a2db0f7fa8e46e 84a37787811d4412a62911dd5aeaf343 - - -] [instance: e92e8e3f-e684-4600-82d6-a64c9b3e7b73] Ignoring supplied device name: /dev/vda. Libvirt can't honour user-supplied dev names
2017-08-31 12:25:06.017 6400 ERROR nova.virt.libvirt.guest [req-2976c1ad-dafb-4523-8ddc-a9c976037e5c 8f1291e9e8e49ac901f45e713bb7fd2e346ff2a7f2464565a7a2db0f7fa8e46e 84a37787811d4412a62911dd5aeaf343 - - -] Error launching a defined domain with XML: <domain type='kvm'>
<name>instance-000000f2</name>
<uuid>e92e8e3f-e684-4600-82d6-a64c9b3e7b73</uuid>
(...)
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/lib/nova/instances/e92e8e3f-e684-4600-82d6-a64c9b3e7b73/disk.eph0'/>
<target dev='sda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<source dev='/dev/disk/by-path/ip-172.27.113.76:3260-iscsi-iqn.2010-10.org.openstack:volume-032bdf4b-afc2-4fda-819f-db69bf53fa30-lun-1'/>
<target dev='vda' bus='ide'/>
<serial>032bdf4b-afc2-4fda-819f-db69bf53fa30</serial>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
(...)
As you can see the two drives are created with the same controller, bus, target and unit.
Then the instance fail to span with this exception :
2017-08-31 12:25:06.019 6400 ERROR nova.compute.manager [req-2976c1ad-dafb-4523-8ddc-a9c976037e5c 8f1291e9e8e49ac901f45e713bb7fd2e346ff2a7f2464565a7a2db0f7fa8e46e 84a37787811d4412a62911dd5aeaf343 - - -]
[instance: e92e8e3f-e684-4600-82d6-a64c9b3e7b73] Instance failed to spawn
2017-08-31 12:25:06.019 6400 ERROR nova.compute.manager [instance: e92e8e3f-e684-4600-82d6-a64c9b3e7b73] Traceback (most recent call last):
2017-08-31 12:25:06.019 6400 ERROR nova.compute.manager [instance: e92e8e3f-e684-4600-82d6-a64c9b3e7b73] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2078, in _build_resources
2017-08-31 12:25:06.019 6400 ERROR nova.compute.manager [instance: e92e8e3f-e684-4600-82d6-a64c9b3e7b73] yield resources
2017-08-31 12:25:06.019 6400 ERROR nova.compute.manager [instance: e92e8e3f-e684-4600-82d6-a64c9b3e7b73] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1920, in _build_and_run_in
stance
2017-08-31 12:25:06.019 6400 ERROR nova.compute.manager [instance: e92e8e3f-e684-4600-82d6-a64c9b3e7b73] block_device_info=block_device_info)
2017-08-31 12:25:06.019 6400 ERROR nova.compute.manager [instance: e92e8e3f-e684-4600-82d6-a64c9b3e7b73] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2583, in spawn
2017-08-31 12:25:06.019 6400 ERROR nova.compute.manager [instance: e92e8e3f-e684-4600-82d6-a64c9b3e7b73] post_xml_callback=gen_confdrive)
2017-08-31 12:25:06.019 6400 ERROR nova.compute.manager [instance: e92e8e3f-e684-4600-82d6-a64c9b3e7b73] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 4823, in _create_domai
n_and_network
2017-08-31 12:25:06.019 6400 ERROR nova.compute.manager [instance: e92e8e3f-e684-4600-82d6-a64c9b3e7b73] post_xml_callback=post_xml_callback)
2017-08-31 12 ...
I've also the same error on compute nodes running on CentOS 7.