Comment 0 for bug 1792077

Chris Friesen (cbf123) wrote :

I'm using devstack stable/rocky on ubuntu 16.04.

When running the command "nova boot --flavor m1.small --nic net-name=public --block-device source=image,id=24e8e922-2687-48b5-a895-3134a650e00f,dest=volume,size=2,bootindex=0,shutdown=remove,bus=scsi --block-device source=blank,dest=volume,size=2,bootindex=1,shutdown=remove,bus=scsi --poll twovol" the instance fails to boot with the error "libvirtError: unsupported configuration: Found duplicate drive address for disk with target name 'sda' controller='0' bus='0' target='0' unit='0'"

For some background information, this works:

nova boot --flavor m1.small --nic net-name=public --block-device source=image,id=24e8e922-2687-48b5-a895-3134a650e00f,dest=volume,size=2,bootindex=0,shutdown=remove,bus=scsi --poll onevol

This also works, if I have two block devices but don't specify "bus=scsi":
nova boot --flavor m1.small --nic net-name=public --block-device source=image,id=24e8e922-2687-48b5-a895-3134a650e00f,dest=volume,size=2,bootindex=0,shutdown=remove --block-device source=blank,dest=volume,size=2,bootindex=1,shutdown=remove --poll twovolnoscsi

This maps to the following XML:

Sep 12 05:05:22 devstack nova-compute[3062]: <devices>
Sep 12 05:05:22 devstack nova-compute[3062]: <disk type="block" device="disk">
Sep 12 05:05:22 devstack nova-compute[3062]: <driver name="qemu" type="raw" cache="none" io="native"/>
Sep 12 05:05:22 devstack nova-compute[3062]: <source dev="/dev/sda"/>
Sep 12 05:05:22 devstack nova-compute[3062]: <target bus="virtio" dev="vda"/>
Sep 12 05:05:22 devstack nova-compute[3062]: <serial>f16cb93d-7bf0-4da7-a804-b9539d64576a</serial>
Sep 12 05:05:22 devstack nova-compute[3062]: </disk>
Sep 12 05:05:22 devstack nova-compute[3062]: <disk type="block" device="disk">
Sep 12 05:05:22 devstack nova-compute[3062]: <driver name="qemu" type="raw" cache="none" io="native"/>
Sep 12 05:05:22 devstack nova-compute[3062]: <source dev="/dev/sdb"/>
Sep 12 05:05:22 devstack nova-compute[3062]: <target bus="virtio" dev="vdb"/>
Sep 12 05:05:22 devstack nova-compute[3062]: <serial>7d5de2b0-cb66-4607-a5f5-60fd40db51c3</serial>
Sep 12 05:05:22 devstack nova-compute[3062]: </disk>

In the failure case, the nova-compute logs include the following interesting bits. Note the additional '<address type="drive" controller="0"/>' lines in the XML.

Sep 12 04:48:43 devstack nova-compute[3062]: ERROR nova.virt.libvirt.guest [None req-a7c5f15c-1e44-4cd1-bf57-45b819676b20 admin admin] Error defining a guest with XML: <domain type="qemu">

Sep 12 04:48:43 devstack nova-compute[3062]: <devices>
Sep 12 04:48:43 devstack nova-compute[3062]: <disk type="block" device="disk">
Sep 12 04:48:43 devstack nova-compute[3062]: <driver name="qemu" type="raw" cache="none" io="native"/>
Sep 12 04:48:43 devstack nova-compute[3062]: <source dev="/dev/sda"/>
Sep 12 04:48:43 devstack nova-compute[3062]: <target bus="scsi" dev="sda"/>
Sep 12 04:48:43 devstack nova-compute[3062]: <serial>08561cc0-5cf2-4eb7-a3f9-956f945e6c24</serial>
Sep 12 04:48:43 devstack nova-compute[3062]: <address type="drive" controller="0"/>
Sep 12 04:48:43 devstack nova-compute[3062]: </disk>
Sep 12 04:48:43 devstack nova-compute[3062]: <disk type="block" device="disk">
Sep 12 04:48:43 devstack nova-compute[3062]: <driver name="qemu" type="raw" cache="none" io="native"/>
Sep 12 04:48:43 devstack nova-compute[3062]: <source dev="/dev/sdb"/>
Sep 12 04:48:43 devstack nova-compute[3062]: <target bus="scsi" dev="sdb"/>
Sep 12 04:48:43 devstack nova-compute[3062]: <serial>007fac3d-8800-4f45-9531-e3bab5c86a1e</serial>
Sep 12 04:48:43 devstack nova-compute[3062]: <address type="drive" controller="0"/>
Sep 12 04:48:43 devstack nova-compute[3062]: </disk>

Sep 12 04:48:43 devstack nova-compute[3062]: : libvirtError: unsupported configuration: Found duplicate drive address for disk with target name 'sda' controller='0' bus='0' target='0' unit='0'
Sep 12 04:48:43 devstack nova-compute[3062]: ERROR nova.virt.libvirt.driver [None req-a7c5f15c-1e44-4cd1-bf57-45b819676b20 admin admin] [instance: cf4f2c6f-7391-4a49-8f40-5e5cda98f78b] Failed to start libvirt guest: libvirtError: unsupported configuration: Found duplicate drive address for disk with target name 'sda' controller='0' bus='0' target='0' unit='0'

Here is the libvirtd log in the failure case:

2018-09-12 04:48:43.312+0000: 16889: error : virDomainDefCheckDuplicateDriveAddresses:5747 : unsupported configuration: Found duplicate drive address for disk with target name 'sda' controller='0' bus='0' target='0' unit='0'