Bug 1315878 - NICs are presented to the VM in alphabetical ordering (so with 10 NICs and more - nic1, nic10, nic2 ... whereas you'd expect nic1, nic2, ...) - need to natural order them [NEEDINFO]
Summary: NICs are presented to the VM in alphabetical ordering (so with 10 NICs and mo...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Version: 3.6.3.3
Hardware: x86_64
OS: Linux
medium
medium vote
Target Milestone: ovirt-4.1.0-beta
: 4.1.0.2
Assignee: Yevgeny Zaspitsky
QA Contact: Meni Yakove
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-08 20:58 UTC by PeterZ
Modified: 2017-02-01 14:41 UTC (History)
6 users (show)

Fixed In Version: 4.1.0.1-0.4.master.20170119130917.git6eac575
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-01 14:41:56 UTC
oVirt Team: Network
danken: needinfo? (zsiga09)
rule-engine: ovirt-4.1+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 69533 0 master MERGED engine: introduce NumericSuffixNormalizer 2017-01-16 12:26:13 UTC
oVirt gerrit 69534 0 master MERGED engine: order nics by their number in the name 2017-01-16 14:45:34 UTC
oVirt gerrit 70645 0 ovirt-engine-4.1 MERGED engine: introduce NumericSuffixNormalizer 2017-01-17 15:11:30 UTC
oVirt gerrit 70646 0 ovirt-engine-4.1 MERGED engine: order nics by their number in the name 2017-01-17 15:11:35 UTC

Description PeterZ 2016-03-08 20:58:42 UTC
Description of problem:

Adding 10 nics to a VM makes ovirt presenting them to VMs in alphabetical order. (ie nic1, nic10, nic2, nic3, etc) So on the VM, nic2 actually becomes nic3.

Version-Release number of selected component (if applicable):


How reproducible:
Easy

Steps to Reproduce:
1. Add 10 nics to vm
2. Connect nic2 to networkA on ovirt
3. Configure networkA on the VM on nic3
4. Observe network connectivity on nic3
5. Configure networkA on the Vm on nic2
6. Network connectivity fails

Actual results:
Shouldn't work on nic3 on the VM, and should work with nic2

Expected results:
Connectivity should be available on nic2

Additional info:

Comment 1 PeterZ 2016-03-08 21:02:42 UTC
Actual version is 3.6.3.4, it's just not showing in the dropdown..

Comment 2 Dan Kenigsberg 2016-03-08 22:02:45 UTC
May I ask whether you have a real use case for 10 vnics? Can you elaborate on it?

Comment 3 PeterZ 2016-03-08 22:43:10 UTC
My firewall team said that they have license for 10 interfaces and they don't want to reboot the firewalls for every addition, so let's just provision all of them at once. 
I realize it's an edge case, also for now they're ok with 9nics, so I'm good if you deem this not worthy to fix.

Comment 4 Sandro Bonazzola 2016-05-02 09:55:09 UTC
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.

Comment 5 Yaniv Lavi 2016-05-23 13:16:44 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 6 Yaniv Lavi 2016-05-23 13:23:09 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 7 Dan Kenigsberg 2016-06-28 15:02:44 UTC
oVirt allocates mac addresses to vNICs based on their alphanumeric order (ReorderVmNicsCommand.java). I think that you can work around this surprising sort by manually editing the nic names (nic1->nic01 etc) when you add the vNICs. 

Would you try that out?

(I am a bit reluctant to add a more complex heuristic for sorting vnics, such as one were if all vnics has nic<number> names they are sorted based on <number>)

Comment 8 Yevgeny Zaspitsky 2017-01-18 10:19:16 UTC
The proposed/implemented solution is sorting vNics in ReorderVmNicsCommand by the natural order. The command could be activated by one of the following flows:
* UI - Add all vNics in the create VM dialog, after VM is created UI doesn't expose an interface to the command, so a subsequent vNic manipulation would not be covered by the change
* REST API - vnics re-order could be activated at any stage prior the VM activation

Comment 9 Michael Burman 2017-01-22 14:29:28 UTC
Verified on -  4.1.0.1-0.1.el7


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