test_instances_with_cinder_volumes: Make sure attachments in guest are correct
Sometimes, when attaching multiple devices, the device mapping that
OpenStack and libvirt expect in the guest is not correct. Change the
attachment logic to check correct ordering and log a warning otherwise.
The `dev` attribute of the `target` element in the libvirt device XML is
just a hint and not guaranteed to be how the OS maps the device [1]. It
is usually suggested to use `/dev/disk/by-id/` to be sure about the
underlying device, but CirrOS currently does not populate `/dev/disk/`.
[1]: https://libvirt.org/formatdomain.html#hard-drives-floppy-disks-cdroms
Closes-Bug: #2095336
Change-Id: Iff18b802ce22743c80a76099b27a479b6c3b671a
1 file changed