Bug 1393941 - [RFE] Tower integration should better log errors
Summary: [RFE] Tower integration should better log errors
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: 5.8.0
Assignee: Brandon Dunne
QA Contact: Pavol Kotvan
URL:
Whiteboard:
Depends On:
Blocks: 1411506
TreeView+ depends on / blocked
 
Reported: 2016-11-10 16:47 UTC by Jeff Warnica
Modified: 2017-06-12 16:33 UTC (History)
4 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1411506 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:33:15 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jeff Warnica 2016-11-10 16:47:06 UTC
Per summary: HTTP errors should be captured and logged, rather then showing "And unknown error was returned from the provider".

Background: Was attempting to execute a simple Tower job in a provisioning cycle, and then reproduced with the rails console. job.create_job(template, {..}) was failing with the above noted message.

tcpdump showed that Tower was reporting back (correctly):

{"inventory":["Job Template 'inventory' is missing or undefined."]}

This should be logged.

Granting that that is only useful to someone who knows Tower, "unknown error" is useless to everyone.

Comment 2 Brandon Dunne 2016-12-06 15:07:59 UTC
Error messages are now properly parsed form the response

Comment 3 CFME Bot 2016-12-06 17:16:30 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/0366af17f56f73e73cbd28b2b01c742b21651818

commit 0366af17f56f73e73cbd28b2b01c742b21651818
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Dec 5 15:37:14 2016 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Mon Dec 5 15:37:14 2016 -0500

    Ensure AnsibleTowerClient.logger is set to $log not a NullLogger
    
    Update ansible_tower_client to take advantage of debug and error logging enhancements
    https://bugzilla.redhat.com/show_bug.cgi?id=1393941
    https://bugzilla.redhat.com/show_bug.cgi?id=1379079

 Gemfile                                                 | 2 +-
 app/models/manageiq/providers/ansible_tower/provider.rb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comment 4 CFME Bot 2016-12-06 17:25:13 UTC
New commit detected on ManageIQ/ansible_tower_client/master:
https://github.com/ManageIQ/ansible_tower_client/commit/cd0c499b8fec663199fa9dcd4199bea880fb9a17

commit cd0c499b8fec663199fa9dcd4199bea880fb9a17
Author:     Brandon Dunne <bdunne>
AuthorDate: Fri Dec 2 15:29:57 2016 -0500
Commit:     Brandon Dunne <bdunne>
CommitDate: Fri Dec 2 15:29:57 2016 -0500

    Provide better error logging for debugging
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1393941

 lib/ansible_tower_client/api.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


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