Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1516982 - Engine creates DomaimXML with vNICs in unpredictable order
Summary: Engine creates DomaimXML with vNICs in unpredictable order
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: ovirt-4.2.0
: ---
Assignee: Tomas Jelinek
QA Contact: Michael Burman
Depends On:
TreeView+ depends on / blocked
Reported: 2017-11-23 18:52 UTC by Dan Kenigsberg
Modified: 2018-02-12 10:12 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-02-12 10:12:06 UTC
oVirt Team: Virt
rule-engine: ovirt-4.2+
rule-engine: blocker+
danken: testing_plan_complete?

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
oVirt gerrit 84631 master MERGED core: sort nics by mac address to preserve order 2017-11-26 08:14:33 UTC

Description Dan Kenigsberg 2017-11-23 18:52:40 UTC
As reported by Irit a few days back, Engine-4.2.0 generates a domxml where interfaces are in random order. This leads to random PCI address allocation by libvirt and random in-guest names. This is particularly harmful when starting VMs  based on a multi-nic template, where nic names may have meaning for pre-configured applications. This is effectively undoing bug 1040630.

Please sort interfaces in the generated XML based on mac address.

We must also add a test for it, so we do not see this bug again. (e.g, create a VM with 10 nics, each onto a different network, and verify that each in-guest interface sees its expected network)

Comment 1 Michal Skrivanek 2017-11-24 08:43:23 UTC
It does not look like a regression, however it is a simple fix.
Note it is sorting it _only_ during initial device assignemnt to VM (first run), once the VM starts with a certain NIC it's PCI address is persisted and doesn't change

Comment 2 Michael Burman 2018-02-04 12:44:30 UTC
Verified on - with vdsm-4.20.17-1.el7ev.x86_64

Comment 3 Sandro Bonazzola 2018-02-12 10:12:06 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

Note You need to log in before you can comment on or make changes to this bug.