Bug 1298193

Summary: Retire vm doesn't work on Azure cloud provider
Product: Red Hat CloudForms Management Engine Reporter: Taras Lehinevych <tlehinev>
Component: AutomateAssignee: William Fitzgerald <wfitzger>
Status: CLOSED ERRATA QA Contact: Jeff Teehan <jteehan>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: bilwei, dajohnso, gblomqui, jfrey, jhardy, jprause, mkanoor, obarenbo, tfitzger, tlehinev
Target Milestone: GA   
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: azure:vm:retirement
Fixed In Version: 5.6.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-29 15:29:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1291274    
Attachments:
Description Flags
Azure retire vm
none
evm.log
none
automation.log none

Description Taras Lehinevych 2016-01-13 12:44:10 UTC
Created attachment 1114397 [details]
Azure retire vm

Description of problem:
When you retire vm on azure provider the power state of vm should be off/stopped what means that vm isn't running, however only the status of vm is change to retired. Please take a look at screenshot.
Also, I'll attach emv and automation log files.

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

How reproducible:
Always

Steps to Reproduce:
1. Set up Azure cloud provider
2. Open any virtual machine
3. Press Lifecycle -> Retire this VM
5. Wait a little bit and check the status of vm and power state

Actual results:
The status of vm is Retired but power state is on

Expected results:
The power state of vm should be off, also cfme shouldn't allow vm to start/power on

Additional info:
The vm navigation tree update status of vm after reload, so please press on "All VMs & Templates" to update statuses.

Appliance info:
IP is 10.8.59.182 
The vm name is testvmretire
This vm was create only for this test, so you can do whatever you need with this vm.

Comment 2 Taras Lehinevych 2016-01-13 12:50:05 UTC
Created attachment 1114398 [details]
evm.log

Comment 3 Taras Lehinevych 2016-01-13 12:50:50 UTC
Created attachment 1114399 [details]
automation.log

Comment 4 Bill Wei 2016-01-20 23:07:55 UTC
Billy, 
The failure is likely caused by the missing method reported in https://bugzilla.redhat.com/show_bug.cgi?id=1291274. Can you take a look and ported the PR to downstream. Please check with Tina.

Comment 5 William Fitzgerald 2016-01-21 19:49:36 UTC
I can't access your appliance. Can you make this available for me?

Comment 6 Jeff Teehan 2016-01-21 22:44:42 UTC
Use this one for 5.5.2.1  It's configured already.
https://10.16.6.21

Comment 7 William Fitzgerald 2016-01-21 22:56:16 UTC
The generic pre_retirement method is missing.

/ManageIQ/Cloud/VM/Retirement/StateMachines/Methods/pre_retirement

We are working on a fix now.

Comment 8 Tina Fitzgerald 2016-02-11 19:16:06 UTC
This issue has been resolved: https://github.com/ManageIQ/manageiq/pull/5779

Comment 9 Jeff Teehan 2016-04-18 17:52:23 UTC
This is verified as working.  I've terminated or otherwise retired 10 different instances without any issues.

Tested on 5.6.0.1 Beta on on https://10.16.7.174/vm_cloud/explorer

Comment 11 errata-xmlrpc 2016-06-29 15:29:10 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