Bug 1562089

Summary: Nics are Provisioned out of Order for VMware Service Provision
Product: Red Hat CloudForms Management Engine Reporter: myoder
Component: AutomateAssignee: Adam Grare <agrare>
Status: CLOSED CURRENTRELEASE QA Contact: Kedar Kulkarni <kkulkarn>
Severity: high Docs Contact:
Priority: high    
Version: 5.8.0CC: agrare, akarol, cpelland, gmccullo, mkanoor, obarenbo, rovalent, simaishi, tfitzger
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1562235 1562237 (view as bug list) Environment:
Last Closed: 2019-02-11 14:01:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: VMware Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1562235, 1562237    

Comment 5 Greg McCullough 2018-03-29 17:13:50 UTC
Assigning to adam to get credit for the PR.  :)

Comment 6 CFME Bot 2018-03-29 17:18:04 UTC
New commit detected on ManageIQ/manageiq-providers-vmware/master:

https://github.com/ManageIQ/manageiq-providers-vmware/commit/282f0c05c53b9a00321227a1a91e42247074cf6e
commit 282f0c05c53b9a00321227a1a91e42247074cf6e
Author:     Adam Grare <agrare>
AuthorDate: Thu Mar 29 12:07:29 2018 -0400
Commit:     Adam Grare <agrare>
CommitDate: Thu Mar 29 12:07:29 2018 -0400

    Sort unitNumber as an integer not a string

    The get_network_adapters method was sorting NICs by their unitNumber as
    an integer.  This was causing '10' to be sorted before '7', '8', and
    '9'.

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1562089

 app/models/manageiq/providers/vmware/infra_manager/provision/configuration/network.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 7 Greg McCullough 2018-03-29 17:20:01 UTC
Issue re-cap - The VMware unitNumber value was being sorted assuming it was an integer but was actually a string.  Once the unitNumber went above 9 the sort order was wrong.

unitNumbers were: 7, 8, 9, 10, 11
and were sorted as: "10", "11", "7", "8", "9"

Comment 14 Greg McCullough 2018-11-13 13:29:27 UTC
You should be able to find "Config spec:" in evm.log which will dump the config spec structure we send to VMware to help confirm the ordering.

Comment 16 Kedar Kulkarni 2018-11-15 21:56:25 UTC
On 5.10.0.20 I was able to attach the NICs in the order that I wanted.