Instance with two attached volumes fails to start with error: Duplicate ID 'drive-ide0-0-0' for drive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
nova version: mitaka
I imported into Openstack a Linux Centos machine. The instance does not have support for VirtIO. I had to import the boot disk as hda (decorating the glance image with hw_disk_bus='ide'). Now I have this instance with two volumes attached, but when I try to boot the following XML is generated.
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='writeback'/>
[..CUT...]
<target dev='hda' bus='ide'/>
<
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='writeback'/>
[..CUT...]
<target dev='vda' bus='ide'/>
<
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
This is because the two cinder volumes attached appear as /dev/hda and /dev/sda, and this creates a duplicate disk in the XML.
The machine does not boot, and in the nova-compute.log I find a stacktrace.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
2017-04-28 12:56:35.356 43378 ERROR oslo_messaging.
In liberty the two disked attached where marked as /dev/sda /dev/hdb, and everything was working. In mitaka I see this behavior where the two attachments are marked as /dev/sda and /dev/hda and the VM is not booting.
description: | updated |
As a workaround to start the VM I did the following
1) I got a snapshot of the volume that was attached as /dev/hda
2) Using the snapshot I created a new volume
3) I attached also this third volume to the instance, and this attachment was marked by nova as /dev/hdb.
4) I now detached the volume that was marked as /dev/hda
5) Now you have two volumes attached marked as /dev/hdb and /dev/sda
the machine now boots correctly.