Bug 1363897 - Retirement state machine does not handle Ansible Tower services when part of a bundle
Summary: Retirement state machine does not handle Ansible Tower services when part of ...
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.8.0
Assignee: William Fitzgerald
QA Contact: Shveta
Whiteboard: tower:service
Depends On:
Blocks: 1404746 1404747
TreeView+ depends on / blocked
Reported: 2016-08-03 21:18 UTC by Jerome Marc
Modified: 2017-06-12 16:44 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1404746 1404747 (view as bug list)
Last Closed: 2017-06-12 16:44:05 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:

Attachments (Terms of Use)
Example of automation.log with loop on Ansible Tower service retirement (4.61 MB, text/plain)
2016-08-03 21:18 UTC, Jerome Marc
no flags Details
ansible job (74.55 KB, image/png)
2017-05-03 18:21 UTC, Shveta
no flags Details

Description Jerome Marc 2016-08-03 21:18:22 UTC
Created attachment 1187211 [details]
Example of automation.log with loop on Ansible Tower service retirement

Description of problem:
I have a bundle setup with two services, first one is a VM provisioning, second is an Ansible Tower job template (specifying limit in the dialog). Provisioning is fine, but when retirering this service, the ServiceRetirement state machine goes in a loop at StartRetirement step (first step of the state machine) for the Ansible Type service. this causes CFME to become extremely slow and the automate.log to fill up with the same step being executed over and over (MIQ_ABORT is bot handle correctly). Example log attached.

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

How reproducible:

Steps to Reproduce:
1. Create a bundle with item 1) provision a VM, item 2) run Ansible Tower job template
2. Once the service provisioned, retire the service
3. CFME never completes the service retirement as seen in automation.log (loop for the ansible tower service retirement)

Actual results:
The retirement for the Ansible Tower service results with MIQ_ABORT but re-run the same retirement state machine over and over

Expected results:
Retirement state machine should stop, either successfully or with an error

Additional info:
Deleting the services manually (Services > My Services > Configuration > Remove Service from VMDB) causes the retirement service to complete.

Comment 3 Tina Fitzgerald 2016-11-16 21:50:00 UTC
Discussed issue with Kevin Morey who recommended a retirement instance for generic service types. New "Generic" instance should be used as the retirement entry point for Ansible Tower.

Comment 5 William Fitzgerald 2016-12-14 14:23:49 UTC

This PR has been merged so I am moving this to 'post'.


Comment 6 William Fitzgerald 2016-12-14 14:24:32 UTC

Comment 9 Shveta 2017-04-28 05:13:20 UTC
Created a bundle with two service 1) Vmware catalog item and 2) Ansible Tower item . Ordered the bundle. 
Two separate services (one for vmware and one for ansible tower ) are provisioned under MyService. 
On retiring each service , the ansible tower job does not retire .

Appliance :
Service - bundle

Comment 10 William Fitzgerald 2017-05-02 13:51:08 UTC

I was using your appliance on Friday but its not working now.   Is it still available?



Comment 11 Shveta 2017-05-02 16:52:39 UTC 
Service bundle - "retire"

Comment 12 Shveta 2017-05-02 16:54:20 UTC
The job under Automate - Ansible Tower - Job does not retire and keeps showing

Comment 13 Tina Fitzgerald 2017-05-03 13:11:05 UTC
Hi Shveta,

The Ansible Tower Service should not be shown in the UI when it is provisioned as part of a Service Bundle as reported here: 
Once the fix for the above BZ is merged, those sub services will not be shown.

As long as the Ansible Tower job gets retired when the Bundle Service is retired, then it's not an issue.

If you can validate the Bundle retirement works properly, we can validate this ticket.

Let me know if you have any questions.


Comment 14 Shveta 2017-05-03 18:21:40 UTC
Created attachment 1275965 [details]
ansible job

Hi Tina , 

What I am seeing is ansible service whether part of bundle or not does not retire the job . . I have created a catalog item here named ansible and retired it . The service moves to "retired" section in Myservice but the job (Under Automate-Ansible Tower- Jobs) does not retire .

See attached screenshot . Isn't the job supposed to retire with service ?

Comment 15 Tina Fitzgerald 2017-05-03 18:52:41 UTC
Hi Shveta,

No, we don't do anything to the job. 

As long as the Service is marked as Retired, the retirement process has completed successfully.


Comment 16 Shveta 2017-05-03 19:04:56 UTC

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