Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue provisioning to a VM Network from a DVS #11

Merged
merged 2 commits into from
Mar 1, 2017

Conversation

agrare
Copy link
Member

@agrare agrare commented Feb 10, 2017

When provisioning a VM from a template that has a NIC on a DV Portgroup to a regular VM network the NIC backing isn't reset, just the network name is set but the rest of the dvportgroup settings are still there. This causes the new NIC to be put on the populated
portgroup port and the provision will fail.

screenshot from 2017-02-10 15-31-54

When provisioning a VM from a template that has a NIC on a DV Portgroup
to a regular VM network the NIC backing isn't reset, just the network
name is set.  This causes the new NIC to be put on the populated
portgroup port and the provision will fail.
@agrare
Copy link
Member Author

agrare commented Feb 10, 2017

cc @gmcculloug I ran in to this while testing #10 and thought I broke something but its an issue on master also 😄

@agrare agrare added the bug label Feb 13, 2017
@agrare agrare force-pushed the fix_vm_dvs_vlan_provision branch from c446f6e to d0a8752 Compare February 13, 2017 15:25
@agrare
Copy link
Member Author

agrare commented Feb 13, 2017

Without this change the new spec test will fail with:

Failures:

  1) ManageIQ::Providers::Vmware::InfraManager::Provision A new provision request, VMware provisioning should replace network card backing
     Failure/Error: expect(vmcs["deviceChange"][0]["device"]["backing"].xsiType).to eq("VirtualEthernetCardNetworkBackingInfo")
     
       expected: "VirtualEthernetCardNetworkBackingInfo"
            got: "VirtualEthernetCardDistributedVirtualPortBackingInfo"
     
       (compared using ==)
     # ./spec/models/manageiq/providers/vmware/infra_manager/provision_spec.rb:93:in `block (4 levels) in <top (required)>'

because the backing wasn't actually getting reset, just the deviceName was being overwritten but everything else was the same.

@gmcculloug
Copy link
Member

This changes the build_config_spec_vlan method to be more like build_config_spec_dvs which completely rebuilds the vdcs.device.backing structure. 👍

Are there any possible side effects to this change or should users not see any difference?

@agrare
Copy link
Member Author

agrare commented Feb 13, 2017

The only side-effect I can imagine would be expecting some property of the backing to be inherited from the template where now it is getting overwritten.

This shouldn't be an issue because the two backing types (VirtualEthernetCardDistributedVirtualPortBackingInfo and VirtualEthernetCardNetworkBackingInfo) share 0 common properties

@agrare
Copy link
Member Author

agrare commented Feb 13, 2017

@blomquisg can you review?

@agrare
Copy link
Member Author

agrare commented Feb 20, 2017

ping @blomquisg

@blomquisg blomquisg merged commit 25f8af8 into ManageIQ:master Mar 1, 2017
@blomquisg blomquisg added this to the Sprint 56 Ending Mar 13, 2017 milestone Mar 1, 2017
@agrare agrare deleted the fix_vm_dvs_vlan_provision branch March 1, 2017 03:19
agrare pushed a commit to agrare/manageiq-providers-vmware that referenced this pull request Apr 15, 2019
Automate - Notification for Quota Exceeded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants