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

Summary: Engine creates DomaimXML with vNICs in unpredictable order
Product: [oVirt] ovirt-engine Reporter: Dan Kenigsberg <danken>
Component: BLL.NetworkAssignee: Tomas Jelinek <tjelinek>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2.0CC: bugs, igoihman, michal.skrivanek
Target Milestone: ovirt-4.2.0Keywords: Regression
Target Release: ---Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
danken: testing_plan_complete?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-12 10:12:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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 - 4.2.1.5-0.1.el7 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.