Bug 1299069 - MICROSOFT scvmm power off operation not working
MICROSOFT scvmm power off operation not working
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers (Show other bugs)
5.5.0
Unspecified Unspecified
medium Severity unspecified
: GA
: 5.6.0
Assigned To: Bronagh Sorota
Jeff Teehan
: ZStream
: 1299067 (view as bug list)
Depends On:
Blocks: 1308663
  Show dependency treegraph
 
Reported: 2016-01-15 16:16 EST by William Fitzgerald
Modified: 2016-06-29 11:30 EDT (History)
8 users (show)

See Also:
Fixed In Version: 5.6.0.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1308663 (view as bug list)
Environment:
Last Closed: 2016-06-29 11:30:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description William Fitzgerald 2016-01-15 16:16:36 EST
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 16:26:27 EST
*** Bug 1299067 has been marked as a duplicate of this bug. ***
Comment 3 Greg Blomquist 2016-01-21 10:09:22 EST
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 16:44:36 EST
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 17:03:05 EST
You can find more information in BZ:

https://bugzilla.redhat.com/show_bug.cgi?id=1297351
Comment 6 Bronagh Sorota 2016-01-22 11:25:11 EST
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 12:13 EST
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 11:45:53 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/9768c089c7a5d0b43820ff7fe095a330bf2f967e

commit 9768c089c7a5d0b43820ff7fe095a330bf2f967e
Author:     Bronagh Sorota <bsorota@redhat.com>
AuthorDate: Fri Jan 22 14:34:40 2016 -0500
Commit:     Bronagh Sorota <bsorota@redhat.com>
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 18:30:49 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/3b510bea21dab8d4a9320a0e622ba07cb40cbea0

commit 3b510bea21dab8d4a9320a0e622ba07cb40cbea0
Author:     Bronagh Sorota <bsorota@redhat.com>
AuthorDate: Thu Mar 31 14:26:55 2016 -0400
Commit:     Bronagh Sorota <bsorota@redhat.com>
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 09:41:17 EDT
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 14:30:22 EDT
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 11:30:50 EDT
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.