Bug 1372772

Summary: Automate Method: Amazon check_pre_retirement stuck in retry loop
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: AutomateAssignee: mkanoor
Status: CLOSED CURRENTRELEASE QA Contact: Mike Shriver <mshriver>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.5.0CC: dajohnso, jhardy, kzvyahin, mkanoor, mshriver, obarenbo, simaishi, tfitzger
Target Milestone: GAKeywords: ZStream
Target Release: 5.6.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: retirement:ec2
Fixed In Version: 5.6.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1353632 Environment:
Last Closed: 2017-03-13 16:27:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1353632, 1378039    
Bug Blocks:    
Attachments:
Description Flags
instance store
none
set tags none

Comment 2 Satoe Imaishi 2016-09-02 15:34:01 UTC
This was fixed in 5.6.1. Please move to CLOSED CURRENTRELEASE if verification passes.

Comment 4 Kyrylo Zvyagintsev 2016-11-16 13:29:43 UTC
Created attachment 1221152 [details]
instance store

Comment 5 mkanoor 2016-12-20 21:43:11 UTC
For instances provisioned outside of CFME you have to set Lifecycle tags.
Without the tags set we will leave the instances around, all we would do is power it off.

For EBS store instances we can power them off
for instance store instances we cannot power them off, since they only allow for termination.

So once you have a VM provisioned outside of CFME

(1) Select the instance
(2) Click on Policy -> Edit Tags
(3) Category -> LifeCycle Assigned Value -> Fully Retire VM and remove from Provider
(4) Save
(5) Then Retire

I have attached a screenshot

Comment 6 mkanoor 2016-12-20 21:43:57 UTC
Created attachment 1234085 [details]
set tags

Comment 7 mkanoor 2017-01-03 16:08:40 UTC
Hello Kyrylo Zvyagintsev,
Does this resolve your issue, if its an instance provisioned outside of CFME it would have to be tagged like mentioned above to finish the retirement.

Thanks,
Madhu

Comment 8 Dave Johnson 2017-02-09 22:33:49 UTC
Mike, can you take a look at this one as it relates to retirement and see if you can reproduce it.  Thanks,  reach out to Milan or Madhu if something is too mysterious, namely automate.  :)

Comment 9 Mike Shriver 2017-03-13 16:27:35 UTC
Tested in CFME 5.6.4.0 and 5.6.3.3

Instance-store backed instances are only powered down (terminated) on EC2 if the appropriate lifecycle tag is assigned. Without this tag the instance is retired in CFME and is left running on the provider.

The retirement process proceeds correctly for both ebs and instance-store type instances, depending on the tags set.