Bug 1299069 - MICROSOFT scvmm power off operation not working
Summary: MICROSOFT scvmm power off operation not working
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: GA
: 5.6.0
Assignee: Bronagh Sorota
QA Contact: Jeff Teehan
URL:
Whiteboard:
: 1299067 (view as bug list)
Depends On:
Blocks: 1308663
TreeView+ depends on / blocked
 
Reported: 2016-01-15 21:16 UTC by William Fitzgerald
Modified: 2016-06-29 15:30 UTC (History)
8 users (show)

Fixed In Version: 5.6.0.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1308663 (view as bug list)
Environment:
Last Closed: 2016-06-29 15:30:50 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Retiring a VM in the MIQ UI (1.49 MB, image/png)
2016-01-22 17:13 UTC, William Fitzgerald
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description William Fitzgerald 2016-01-15 21:16:36 UTC
Description of problem:

Vm Retirement using microsoft svcmm provider did not power off Vm.  No errors in log

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


How reproducible:


Steps to Reproduce:
1.  provision svcmm vm
2.  retire vm
3.  vm still exists

Actual results:

vm is still powered  on
Expected results:

vm is powered off
Additional info:

[----] I, [2016-01-15T07:51:51.023274 #13387:f17994]  INFO -- : Processing State=[CheckPreRetirement]
[----] E, [2016-01-15T07:51:51.023508 #13387:f17994] ERROR -- : State=<CheckPreRetirement> running  raised exception: <number of retries <101> exceeded maximum of <100>>
[----] W, [2016-01-15T07:51:51.023652 #13387:f17994]  WARN -- : Error in State=[CheckPreRetirement]
[----] I, [2016-01-15T07:51:51.023935 #13387:f17994]  INFO -- : In State=[CheckPreRetirement], invoking [on_error] method=[update_retirement_status(status => 'Error in CheckPreRetirement')]

Comment 2 William Fitzgerald 2016-01-15 21:26:27 UTC
*** Bug 1299067 has been marked as a duplicate of this bug. ***

Comment 3 Greg Blomquist 2016-01-21 15:09:22 UTC
Bill,

it looks like the logs are saying 'Error in CheckPreRetirement'.  I'm just guessing, but it's possible that you can't retire a running VM, maybe?

Can you try again, but stop the VM first?

If it's a requirement that you be able to retire running VMs, we can look at that more.

Comment 4 William Fitzgerald 2016-01-21 21:44:36 UTC
This problem is for the MSCVMM provider. We have multiple issues here.


I needed to make changes to the schema to call the Pre_retirement and Check_pre_retirement methods for the MSCVMM provider (issue #1). 

https://bugzilla.redhat.com/show_bug.cgi?id=1297351

When they are called, if the vm is powered on it fails to power off the Vm. (issue #2, this ticket).  

https://bugzilla.redhat.com/show_bug.cgi?id=1299069

If the vm is powered off, the retirement fails when it runs the Remove_from_provider method. (issue #3) 

https://bugzilla.redhat.com/show_bug.cgi?id=1299071

The Error in the log is because it tried 100 times to stop the Vm and wasn't successful.

Comment 5 William Fitzgerald 2016-01-21 22:03:05 UTC
You can find more information in BZ:

https://bugzilla.redhat.com/show_bug.cgi?id=1297351

Comment 6 Bronagh Sorota 2016-01-22 16:25:11 UTC
Bill,
Issues #2 and #3 are provider issues so I will comment on them.
Support for deleting/destroying a VM on the SCVMM provider has not been implemented yet  since this is part of retirement, this is why you see the error when you try to retire a VM. I will take ownership of this piece for SCVMM.

I just successfully powered off 3 different VMs via the UI. Can you provide more details around the steps you followed, eg which VM? Does that VM power off OK via SCVMM itself (I sent you the SCVMM login details)? Is there an error in the log?

thanks

Comment 7 William Fitzgerald 2016-01-22 17:13:20 UTC
Created attachment 1117308 [details]
Retiring a VM in the MIQ UI

My Appliance: 10.8.99.208
Using the MIQ UI, I select the Vm (vm_status_retire). I click on the 'Lifecycle' button.  Then I select 'Retire this VM'.  I am attaching a screen shot.

Comment 9 CFME Bot 2016-01-25 16:45:53 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/9768c089c7a5d0b43820ff7fe095a330bf2f967e

commit 9768c089c7a5d0b43820ff7fe095a330bf2f967e
Author:     Bronagh Sorota <bsorota>
AuthorDate: Fri Jan 22 14:34:40 2016 -0500
Commit:     Bronagh Sorota <bsorota>
CommitDate: Fri Jan 22 14:34:40 2016 -0500

    Implementation of the vm_destroy method required for SCVMM VM retirement
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1299069
    https://bugzilla.redhat.com/show_bug.cgi?id=1299071

 app/models/manageiq/providers/microsoft/infra_manager.rb | 7 +++++++
 1 file changed, 7 insertions(+)

Comment 11 CFME Bot 2016-03-31 22:30:49 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/3b510bea21dab8d4a9320a0e622ba07cb40cbea0

commit 3b510bea21dab8d4a9320a0e622ba07cb40cbea0
Author:     Bronagh Sorota <bsorota>
AuthorDate: Thu Mar 31 14:26:55 2016 -0400
Commit:     Bronagh Sorota <bsorota>
CommitDate: Thu Mar 31 14:26:55 2016 -0400

    SCVMM retirement:
    Power off the VM before deleting it, regardless of what the power status is.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1299069

 app/models/manageiq/providers/microsoft/infra_manager.rb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comment 13 Bronagh Sorota 2016-05-06 13:41:17 UTC
It is unclear to me why this BZ has the keyword "Zstream" set and at the same time has a target release of 5.6. I am going to treat it as an upstream BZ and move the status to POST.

Comment 14 Jeff Teehan 2016-05-12 18:30:22 UTC
This has been working fine for the last several builds.  I verified it using 5605 on https://10.16.7.169/vm_infra/explorer#

Comment 16 errata-xmlrpc 2016-06-29 15:30:50 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/RHBA-2016:1348


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