]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: correct false boot order error during domain parse
authorLaine Stump <laine@laine.org>
Fri, 7 Sep 2018 01:09:45 +0000 (21:09 -0400)
committerLaine Stump <laine@laine.org>
Wed, 12 Sep 2018 15:09:53 +0000 (11:09 -0400)
commit7ea7342996d74591e00bcbf14b1eb3995f77a199
tree7350d50aacde49bcbe6dc23bbde6c11ab8e4a2a9
parent36504033aec8b58548a83306054adbdd69ceeede
conf: correct false boot order error during domain parse

virDomainDefCollectBootOrder() is called for every item on the list
for each type of device. One of the checks it makes is to gather the
order attributes from the <boot> element of all devices, and assure
that no two devices have been given the same order.

Since (internally to libvirt, *not* in the domain XML) an <interface
type='hostdev'> is on both the list of hostdev devices and the list of
network devices, it will be counted twice, and the code that checks
for multiple devices with the same boot order will give a false
positive.

To remedy this, we make sure to return early for hostdev devices that
have a parent.type != NONE.

This was introduced in commit 5b75a4, which was first in libvirt-4.4.0.

Resolves: https://bugzilla.redhat.com/1601318

Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c
tests/qemuxml2argvdata/net-hostdev-bootorder.args [new file with mode: 0644]
tests/qemuxml2argvdata/net-hostdev-bootorder.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c
tests/qemuxml2xmloutdata/net-hostdev-bootorder.xml [new file with mode: 0644]
tests/qemuxml2xmltest.c