Bug 1378039

Summary: Can't retire amazon instance
Product: Red Hat CloudForms Management Engine Reporter: Kyrylo Zvyagintsev <kzvyahin>
Component: AutomateAssignee: William Fitzgerald <wfitzger>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Shriver <mshriver>
Severity: high Docs Contact:
Priority: high    
Version: 5.6.0CC: cpelland, jhardy, kzvyahin, mhild, mkanoor, obarenbo, simaishi, tfitzger
Target Milestone: GAKeywords: TestOnly
Target Release: 5.8.0Flags: kzvyahin: automate_bug+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ec2:retirement
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1379697 1384211 (view as bug list) Environment:
Last Closed: 2017-06-12 17:10:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: AWS Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1372772, 1379697, 1384211    

Description Kyrylo Zvyagintsev 2016-09-21 11:26:45 UTC
Description of problem:


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

How reproducible:
100%

Steps to Reproduce:
1. Provision instance using aws ui
2. add provider to cfme
3. retire instance

Actual results:
Instance stuck in Retiring state. Power state is on under cfme and aws ui

Expected results:
Instance shoud get retired state. Power state is off. Should be stopped under provider

Additional info:
Use instance Root device type: ebs and instance store

Comment 2 William Fitzgerald 2016-09-21 18:27:43 UTC
Kyrylo,

Can I get access to your appliance ?

Thanks

Billy

Comment 5 William Fitzgerald 2016-09-27 15:11:20 UTC
Kyrylo,

Can you please keep this environment till next week so that we can look at it further?

We found a problem with vm.hardware.root_device_type on your appliance.

For Amazon, there are 2 valid types:
    ebs
    instance-store.

For some reason the VMDB is not showing values for 4 Vm's in your database but the provider has the proper values. 

Thanks

Billy

Comment 6 Marcel Hild 2016-09-27 16:47:05 UTC
So the problem has something to do with the instance not being started from a template that is known to manageiq.

Can you have a look if this problem still persists when creating an instance from within manageiq?

Comment 9 William Fitzgerald 2016-09-29 18:13:46 UTC
When I provision in AWS, the root_device_type is not set and this is what is causing the problem.  A refresh doesn't fix the problem.  Currently, we will not stop a running  instance like this and then we will run amazon_check_pre_retirement 101 times and then fail.  

Billy

Comment 10 mkanoor 2016-10-10 15:27:45 UTC
We are waiting on updates to the Amazon provider gem 
https://github.com/ManageIQ/manageiq-providers-amazon/pull/51

Is waiting to be merged.

Comment 12 William Fitzgerald 2016-11-30 20:17:35 UTC
Kyrylo,

I tested this with the latest build and it works now.

I can now see the instance type in the UI and it retires ...

Thanks

Billy

Comment 13 Mike Shriver 2017-03-16 22:22:17 UTC
Verified in CFME 5.8.0.4, EC2 instance types (root device and virtualization) are displayed in the Properties table. Instances are correctly retired according to their type and tagging.