Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1514986 - [SCVMM] Destination placement_host_name not provided
Summary: [SCVMM] Destination placement_host_name not provided
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.10.0
Assignee: Adam Grare
QA Contact: Dave Johnson
URL:
Whiteboard: provision:scvmm:auto
Depends On:
Blocks: 1519819 1538349
TreeView+ depends on / blocked
 
Reported: 2017-11-19 21:21 UTC by Leo Khomenko
Modified: 2018-06-21 20:48 UTC (History)
6 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1519819 1538349 (view as bug list)
Environment:
Last Closed: 2018-06-21 20:48:15 UTC
Category: ---
Cloudforms Team: CFME Core
lkhomenk: automate_bug+


Attachments (Terms of Use)

Description Leo Khomenko 2017-11-19 21:21:54 UTC
Description of problem:auto_placement provision fails to get placement host

D, [2017-11-19T16:15:25.395274 #27006:109512c] DEBUG -- : Q-task_id([miq_provision_request_27]) MIQ(MiqProvisionRequest#clean_up_keys_for_request_task) MiqProvisionRequest Attributes: [{"description"=>"Provision from [fedora-small-tmpl] to [test-auto_placement]", "options"=>{:initial_pass=>true, :src_vm_id=>[340, "fedora-small-tmpl"], :miq_request_dialog_name=>"miq_provision_microsoft_dialogs_template", :current_tab_key=>:network, :owner_phone=>nil, :owner_country=>nil, :owner_phone_mobile=>nil, :owner_title=>nil, :owner_first_name=>nil, :owner_manager=>nil, :owner_address=>nil, :owner_company=>nil, :owner_last_name=>nil, :owner_manager_mail=>nil, :owner_city=>nil, :owner_department=>nil, :owner_load_ldap=>nil, :owner_manager_phone=>nil, :owner_state=>nil, :owner_office=>nil, :owner_zip=>nil, :owner_email=>"xdfsdf@asdad.asd", :request_notes=>nil, :vm_tags=>[], :customization_template_script=>nil, :dns_servers=>nil, :dns_suffixes=>nil, :root_password=>nil, :addr_mode=>["static", "Static"], :gateway=>nil, :hostname=>nil, :ip_addr=>nil, :subnet_mask=>nil, :placement_dc_name=>[nil, nil], :placement_cluster_name=>[nil, nil], :cluster_filter=>[nil, nil], :placement_auto=>[true, 1], :placement_host_name=>[nil, nil], :placement_ds_name=>[nil, nil], :provision_type=>["microsoft", "Microsoft"], :number_of_vms=>[1, "1"], :vm_description=>nil, :vm_prefix=>nil, :linked_clone=>[nil, nil], :vm_name=>"test-auto_placement", :pxe_server_id=>[nil, nil], :schedule_type=>["immediately", "Immediately on Approval"], :vm_auto_start=>[true, 1], :schedule_time=>Mon, 20 Nov 2017 00:00:00 UTC +00:00, :retirement=>[0, "Indefinite"], :retirement_warn=>[604800, "1 Week"], :stateless=>[false, 0], :vlan=>["da147f17-5887-4849-a2f7-e02d8a04efe7", "cfme2"], :mac_address=>nil, :subnet=>[nil, nil], :disk_format=>["default", "Default"], :cpu_limit=>nil, :number_of_sockets=>[1, "1"], :cores_per_socket=>[1, "1"], :cpu_reserve=>nil, :vm_dynamic_memory=>[false, 0], :vm_memory=>["1024", "1024"], :vm_maximum_memory=>["1024", "1024"], :vm_minimum_memory=>["1024", "1024"], :network_adapters=>[1, "1"], :start_date=>"11/20/2017", :start_hour=>"0", :start_min=>"0", :src_vm_nics=>[], :src_vm_lans=>[], :src_ems_id=>[6, "scvmm2016"], :owner_group=>nil, :delivered_on=>2017-11-19 21:15:25 UTC, :user_message=>"[EVM] VM [test-auto_placement] Step [CheckProvisioned] Status [Error Creating VM] Message [[MiqException::MiqProvisionError]: Destination placement_host_name not provided] ", :requester_group=>"EvmGroup-super_administrator"}, "request_type"=>"template", "message"=>"VM Provisioning - Request Created", "userid"=>"admin", "source_id"=>340, "source_type"=>"VmOrTemplate", "destination_id"=>nil, "destination_type"=>nil, "tenant_id"=>2}]...



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


How reproducible:100%


Steps to Reproduce:
1.provision VM with auto_placement

Actual results:provision fails to start


Expected results:VM provisioned


Additional info:

Comment 2 Dave Johnson 2017-11-20 21:13:47 UTC
Leo, is this a regression?  And which auto_placement logic are we using, tagging or C&U data? (which I am not familiar with and we probably need to make sure we have coverage around moving forward.  ;)

Marking as blocker for now.

Comment 4 Dave Johnson 2017-11-21 16:29:00 UTC
It should be noted that this is working everywhere but scvmm.

Comment 5 Dave Johnson 2017-11-21 16:29:30 UTC
Also seen in 5.8.0

Comment 6 Adam Grare 2017-11-21 16:30:24 UTC
I believe the real issue is that placement_ds_name is nil, looking at the best-fit least utilized for scvmm (https://github.com/ManageIQ/manageiq-content/blob/master/content/automate/ManageIQ/Infrastructure/VM/Provisioning/Placement.class/__methods__/microsoft_best_fit_least_utilized.rb#L24-L29) we get the host from the storage.

Comment 7 Dave Johnson 2017-11-21 16:31:00 UTC
Specifically tested on 5.8.2 (comment 5), apologies for the extra SPAM

Comment 8 Greg Blomquist 2017-11-27 22:07:52 UTC
Adam, based on comment #6, does that make this user error?  Or, is this a bug that needs to be investigated?

Comment 9 Adam Grare 2017-11-28 00:53:55 UTC
I think this is still an issue, my guess right now is that networks with the same name have a different uid_ems and picking a specific network is filtering the list of eligible_hosts to 0.

Comment 10 Adam Grare 2017-11-30 18:17:03 UTC
Actually I think this is much simpler, for some reason every one of my hosts report that they are in maintenance mode and https://github.com/ManageIQ/manageiq-content/pull/84 skips hosts in maintenance mode for best_fit_least_utilized.

I'm looking into why the parser is setting every host as in maintenance mode.

Comment 12 CFME Bot 2017-11-30 20:49:36 UTC
New commit detected on ManageIQ/manageiq-providers-scvmm/master:
https://github.com/ManageIQ/manageiq-providers-scvmm/commit/82aad74204b357cdd65b28ba32faec10fdf2532e

commit 82aad74204b357cdd65b28ba32faec10fdf2532e
Author:     Adam Grare <agrare@redhat.com>
AuthorDate: Thu Nov 30 13:53:00 2017 -0500
Commit:     Adam Grare <agrare@redhat.com>
CommitDate: Thu Nov 30 15:17:42 2017 -0500

    Fix host maintenance mode
    
    Host OverallState is an integer but was being compared to "ok" so all
    SCVMM hosts were being treated as if they were in maintenance mode.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1514986

 .../manageiq/providers/microsoft/infra_manager/refresh_parser.rb    | 6 +++++-
 .../manageiq/providers/microsoft/infra_manager/refresher_spec.rb    | 3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

Comment 13 Adam Grare 2017-11-30 20:53:13 UTC
This fixes hosts being in maintenance mode when they shouldn't be.  I don't get this error anymore but I do get a clustered datastore error which is unrelated to this bug.

Comment 15 Adam Grare 2017-12-05 13:02:45 UTC
Present in 5.8 so setting 5.8.z ?


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