Bug 1452823 - [Microsoft]Auto_placement provision fails due to selecting Host in Maintenance state
Summary: [Microsoft]Auto_placement provision fails due to selecting Host in Maintenanc...
Keywords:
Status: CLOSED ERRATA
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.8.0
Assignee: William Fitzgerald
QA Contact: Jeff Teehan
URL:
Whiteboard: provider:scvmm::provision:auto
Depends On: 1452820 1454880
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-19 18:06 UTC by Satoe Imaishi
Modified: 2017-05-31 15:13 UTC (History)
10 users (show)

Fixed In Version: 5.8.0.9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1452820
Environment:
Last Closed: 2017-05-31 15:13:38 UTC
Category: Bug
Cloudforms Team: VMware
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1367 0 normal SHIPPED_LIVE Moderate: CFME 5.8.0 security, bug, and enhancement update 2017-05-31 18:16:03 UTC

Comment 2 dajohnso@redhat.com 2017-05-22 20:29:28 UTC
Satoe, is the fixed in version field right here?

Comment 3 Satoe Imaishi 2017-05-22 20:32:00 UTC
Yes, 5.8.0.9 includes the fix.

Comment 4 Jeff Teehan 2017-05-23 16:54:11 UTC
This is never going to work.  We're not collecting the Host state from get_inventory.ps  Need HyperVStateString, not OverallState

Name                                                   OverallState HyperVStateString
----                                                   ------------ -----------------
dhcp129-212.brq.redhat.com                           NeedsAttention Unknown
qeblade26.cfme-qe-vmm-ad.rhq.lab.eng.bos.redhat.com MaintenanceMode Running
qeblade33.cfme-qe-vmm-ad.rhq.lab.eng.bos.redhat.com              OK Running

Dan is working on it. ManageIQ/manageiq#15202

Comment 5 Greg McCullough 2017-05-23 17:13:46 UTC
Let's be clear here, the PR for automate is correct in that we should be checking the maintenance flag during provisioning best-fit.

The issue that Jeff raises is that it has a dependency on the provider to properly set the maintenance flag during inventory refresh which is being addressed in the referenced PR https://github.com/ManageIQ/manageiq/pull/15202.

Comment 6 Jeff Teehan 2017-05-23 17:50:24 UTC
Greg is correct.  Sorry about that first line.  I applied Dan's patch to the test machine and now see this in the log:

[----] E, [2017-05-23T13:30:54.409156 #39368:b8914c] ERROR -- : Q-task_id([miq_provision_12]) <SCVMM> MIQ(Class#log_dos_error_results) Virtual machine jt523a cannot be deployed or migrated to host qeblade26.cfme-qe-vmm-ad.rhq.lab.eng.bos.redhat.com because the host is in maintenance mode.

There is a follow-on issue in the it fails right after because it still attempts start_clone_task even though it already failed.  Here is the line immediately after the above line:

[----] E, [2017-05-23T13:30:54.640847 #39368:b8914c] ERROR -- : Q-task_id([miq_provision_12]) MIQ(ManageIQ::Providers::Microsoft::InfraManager::Provision#provision_error) [[JSON::ParserError]: 743: unexpected token at ''] encountered during phase [start_clone_task]

I need guidance on whether this is something else or part of this bz.  My guess is that the task_id([xyz}) should be terminated at the maintenance mode check, and the maintenance mode text should be placed into the requests last message.

Comment 7 Jeff Teehan 2017-05-25 19:26:12 UTC
When I applied 15202, this particular issue does not occur.  I'm moving it to verified based on that and discussion with dev.

Comment 9 errata-xmlrpc 2017-05-31 15:13:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:1367


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