Bug 1448186 - bad error message when adding playbook catalog item while embedded ansible is disabled
Summary: bad error message when adding playbook catalog item while embedded ansible is...
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
medium
Target Milestone: GA
: 5.9.0
Assignee: Drew Bomhof
QA Contact: luke couzens
URL:
Whiteboard: ansible_embed:playbook:catalog
Depends On:
Blocks: 1449846
TreeView+ depends on / blocked
 
Reported: 2017-05-04 17:54 UTC by luke couzens
Modified: 2018-03-06 15:36 UTC (History)
7 users (show)

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


Attachments (Terms of Use)
screen showing error (125.62 KB, image/png)
2017-05-04 17:54 UTC, luke couzens
no flags Details

Description luke couzens 2017-05-04 17:54:35 UTC
Created attachment 1276402 [details]
screen showing error

Description of problem:bad error message when adding playbook catalog item while embedded ansible is disabled


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


How reproducible:100%


Steps to Reproduce:
1.provision appliance
2.enable embedded ansible
3.add repo
4.disable embedded ansible
5.try to add a catalog item with playbook from repo

Actual results:
Could not create Service Template - <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>503 Service Unavailable</title> </head><body> <h1>Service Unavailable</h1> <p>The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.</p> </body></html>

Expected results: Error message such as 'Embedded ansible is disabled'


Additional info:

Comment 2 Greg McCullough 2017-05-05 21:16:09 UTC
Drew, I am thinking of a few ways we could approach this since it could be the result more than just the role disabled.

Suggestions:
1) Override the with_provider_connection method for the embedded provider to check if the role is enabled.  Raise error if it is not.  This would help in many areas that communicate with the provider, includes authoring and ordering of the service.

2) Look to detect and raise a cleaner error message if the gem if the Tower server is unavailable.

Suggest work with Brandon if needed.

Comment 5 CFME Bot 2017-05-10 19:17:01 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/6b99c98811f1723fc0424ca7dd0dc81ee45d3b64

commit 6b99c98811f1723fc0424ca7dd0dc81ee45d3b64
Author:     Drew Bomhof <dbomhof>
AuthorDate: Wed May 10 14:05:07 2017 -0400
Commit:     Drew Bomhof <dbomhof>
CommitDate: Wed May 10 15:00:30 2017 -0400

    Modify specs to set the embedded role
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1448186

 app/models/manageiq/providers/embedded_ansible/provider.rb          | 4 ++--
 .../automation_manager/configuration_script_spec.rb                 | 4 ++++
 .../embedded_ansible/automation_manager/credential_spec.rb          | 4 ++++
 .../refresher_configuration_script_source_spec.rb                   | 4 ++++
 .../providers/embedded_ansible/automation_manager/refresher_spec.rb | 4 ++++
 .../embedded_ansible/automation_manager/refresher_v2_spec.rb        | 4 ++++
 spec/models/manageiq/providers/embedded_ansible/provider_spec.rb    | 4 +---
 spec/support/evm_spec_helper.rb                                     | 6 ++++++
 8 files changed, 29 insertions(+), 5 deletions(-)

Comment 6 CFME Bot 2017-05-10 19:17:07 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/27dc7f85949836e9f774be4a37a913e22314f409

commit 27dc7f85949836e9f774be4a37a913e22314f409
Author:     Drew Bomhof <dbomhof>
AuthorDate: Tue May 9 15:20:49 2017 -0400
Commit:     Drew Bomhof <dbomhof>
CommitDate: Wed May 10 13:33:53 2017 -0400

    Check the Embedded Ansible role is on
    
    1. Raise an error if an attempt at raw_connect is made if the role is not enabled
    2. Continue on as normal with the connect if the role is enabled
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1448186

 .../manageiq/providers/embedded_ansible/provider.rb   | 10 ++++++++++
 .../providers/embedded_ansible/provider_spec.rb       | 19 +++++++++++++++++++
 2 files changed, 29 insertions(+)

Comment 8 luke couzens 2017-10-12 16:09:02 UTC
Verified in 5.9.0.2


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