Bug 1435814 - [VMWARE]Auto_placement provision fails if best_fit host doesn't have selected VM Network
Summary: [VMWARE]Auto_placement provision fails if best_fit host doesn't have selected...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.9.0
Assignee: Lucy Fu
QA Contact: Alex Newman
URL:
Whiteboard: vmware:provision
Depends On:
Blocks: 1458363
TreeView+ depends on / blocked
 
Reported: 2017-03-24 21:14 UTC by Leo Khomenko
Modified: 2020-12-14 08:24 UTC (History)
6 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1458363 (view as bug list)
Environment:
Last Closed: 2018-03-06 15:38:19 UTC
Category: ---
Cloudforms Team: VMware
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Leo Khomenko 2017-03-24 21:14:57 UTC
Description of problem: VM provision with auto_placement fails if best_fit host doesn't have selected VM Network

[EVM] VM [test_vlan_lkhom_3] Step [CheckProvisioned] Status [[MiqException::MiqProvisionError]: Port group [DPortGroup] is not available on target] Message [[MiqException::MiqProvisionError]: Port group [DPortGroup] is not available on target]


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


How reproducible:100%


Steps to Reproduce:
1.Prepare env on which host A won't have VM Network B
2.Host A also should be the best choice for provisioning
3.Provision VM with auto_placement and select VM Network B

Actual results:provision fails


Expected results:auto_placement should affect VM Network also


Additional info:this issue is not reproducible with manual Host/Datastore selection as selected Host limits VM network options

Comment 2 Greg McCullough 2017-04-26 18:25:52 UTC
Lucy, VMware best-fit for ManageIQ uses the eligible_hosts method, which means it calls allowed_hosts on the workflow

See here: https://github.com/ManageIQ/manageiq-content/blob/master/content/automate/ManageIQ/Infrastructure/VM/Provisioning/Placement.class/__methods__/vmware_best_fit_least_utilized.rb#L18

We need to look into having the VMware allowed_hosts method filter the hosts if a network is already selected.  Adam would be a good resource here.

Comment 4 CFME Bot 2017-05-01 14:21:43 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/4c807454c8398b476f21bbba21addd94400debfd

commit 4c807454c8398b476f21bbba21addd94400debfd
Author:     Lucy Fu <lufu>
AuthorDate: Fri Apr 28 15:43:04 2017 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Fri Apr 28 15:46:09 2017 -0400

    Filter out the hosts with the selected network.
    
    Once a network is selected, the available hosts should be filtered out to the hosts that are on the selected network.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1435814

 app/models/miq_provision_virt_workflow.rb       |  9 +++++++
 spec/models/miq_provision_virt_workflow_spec.rb | 31 +++++++++++++++++++++++++
 2 files changed, 40 insertions(+)


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