Bug 1414975 - vCenter DVS network selection after upgrade to CloudForms 4.2 fails
Summary: vCenter DVS network selection after upgrade to CloudForms 4.2 fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.8.0
Assignee: Adam Grare
QA Contact: Alex Newman
URL:
Whiteboard: vmware:sdn
Depends On:
Blocks: 1427298
TreeView+ depends on / blocked
 
Reported: 2017-01-19 21:13 UTC by myoder
Modified: 2020-06-11 13:12 UTC (History)
9 users (show)

Fixed In Version: 5.8.0.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1427298 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:47:46 UTC
Category: Bug
Cloudforms Team: VMware
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
cfme-4.1 provision/container/network.rb (6.95 KB, text/plain)
2017-01-20 20:49 UTC, Adam Grare
no flags Details
5.7.0.17 dvPortgroup uid_ems hotfix (65.81 KB, text/plain)
2017-01-25 18:28 UTC, Adam Grare
no flags Details

Description myoder 2017-01-19 21:13:54 UTC
Description of problem: 

Trying to provision a VM through automate and the following methods are not working.  These methods worked in CloudForms 4.1 and are failing after the upgrade to CloudForms 4.2 

selected_network = "dvs_FCS Cloud Network"
prov.set_option(:vlan , selected_network )


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

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 6 Adam Grare 2017-01-20 20:47:16 UTC
We found that the DistributedVirtualPortgroup MOR and the key while typically are equal do not have to be.  When they are not equal we are setting the portgroupKey to be the MOR and VMware fails to find the portgroup.

We need to store the dvportgroup.key in uid_ems instead of dvportgroup.MOR.

Comment 7 Adam Grare 2017-01-20 20:49:19 UTC
Created attachment 1242996 [details]
cfme-4.1 provision/container/network.rb

Workaround is to revert the app/models/manageiq/providers/vmware/infra_manager/provision/configuration/network.rb file back to 4.1 (attached) which looks up the dvportgroup from the VC instead of the database.

Comment 8 Adam Grare 2017-01-25 18:26:56 UTC
I was able to reproduce this issue by importing a DVSwitch from another VC and selecting Preserve original switch and port identifiers.

I have a PR to fix the issue, https://github.com/ManageIQ/manageiq-providers-vmware/pull/5

I'm attaching a refresh_parser.rb file from 5.7 with the change from that PR included, can you have the customer copy this file to /var/www/miq/vmdb/app/models/manageiq/providers/vmware/infra_manager/refresh_parser.rb, restart evmserver, and try to reproduce?

Comment 9 Adam Grare 2017-01-25 18:28:34 UTC
Created attachment 1244342 [details]
5.7.0.17 dvPortgroup uid_ems hotfix

app/models/manageiq/providers/vmware/infra_manager/refresh_parser.rb from 5.7.0.17 with https://github.com/ManageIQ/manageiq-providers-vmware/pull/5 applied


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