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", :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:
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.
It should be noted that this is working everywhere but scvmm.
Also seen in 5.8.0
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.
Specifically tested on 5.8.2 (comment 5), apologies for the extra SPAM
Adam, based on comment #6, does that make this user error? Or, is this a bug that needs to be investigated?
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.
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.
https://github.com/ManageIQ/manageiq-providers-scvmm/pull/53
New commit detected on ManageIQ/manageiq-providers-scvmm/master: https://github.com/ManageIQ/manageiq-providers-scvmm/commit/82aad74204b357cdd65b28ba32faec10fdf2532e commit 82aad74204b357cdd65b28ba32faec10fdf2532e Author: Adam Grare <agrare> AuthorDate: Thu Nov 30 13:53:00 2017 -0500 Commit: Adam Grare <agrare> 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(-)
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.
Present in 5.8 so setting 5.8.z ?