Bug 1439667 - Failed Ansible Playbook provision doesn't update status, started and completed fields.
Summary: Failed Ansible Playbook provision doesn't update status, started and complete...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.0
Assignee: Bill Wei
QA Contact: Kedar Kulkarni
URL:
Whiteboard:
Depends On: 1501143
Blocks: 1440323
TreeView+ depends on / blocked
 
Reported: 2017-04-06 11:50 UTC by Roland Wolters
Modified: 2018-03-06 14:42 UTC (History)
4 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1440323 (view as bug list)
Environment:
Last Closed: 2018-03-06 14:42:48 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Example of a retired service in state pending with a failed playbook (165.29 KB, image/png)
2017-04-06 11:50 UTC, Roland Wolters
no flags Details

Description Roland Wolters 2017-04-06 11:50:50 UTC
Created attachment 1269358 [details]
Example of a retired service in state pending with a failed playbook

Description of problem:
If a service is retired which has a playbook run that fails during the retirement, the state of the service is just "pending", but should be "failed" or similar.

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

How reproducible:
Create a service with playbooks for provisioning and retirement. If the service is retired and the playbook for retirement fails during that, the service remains in the state "pending", but it should have a failed state.

Steps to Reproduce:
1. Create a service with a playbook which is executed during retirement - and fails
2. Provision the service
3. Retire the service

Actual results:
Playbook fails, but service is shown as retired in state pending. See screenshot.

Expected results:
The service state should be failed or similar.

Additional info:

Comment 2 Tina Fitzgerald 2017-04-06 16:35:01 UTC
Hi Roland,

The "pending" status you see is actually the provision status.  It is not correct, but the status, started and completed information comes from the Ansible Tower job instance.  

The fact that the Service shows "retired" means that retirement completed successfully.  

There's another issue here in that the Service should have a retirement tab with the retirement playbook information. I believe that problem has already been addressed, but the fix is not included in your build. 

Changing the ticket description.

Please let me know if you have any questions.

Regards,
Tina

Comment 4 CFME Bot 2017-04-07 16:06:27 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/e6de7911b077e255a34b16f9d9323d6f631a24a3

commit e6de7911b077e255a34b16f9d9323d6f631a24a3
Author:     Bill Wei <bilwei>
AuthorDate: Thu Apr 6 14:07:51 2017 -0400
Commit:     Bill Wei <bilwei>
CommitDate: Thu Apr 6 16:30:02 2017 -0400

    Ensure to update job status on error cleaning up
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1439667

 app/models/service_ansible_playbook.rb       | 1 +
 spec/models/service_ansible_playbook_spec.rb | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

Comment 6 Dmitry Misharov 2017-11-03 09:29:47 UTC
Fixed and verified in 5.9.0.5.20171102023815_209f732. Failed status shown correctly.


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