Description of problem: Currently, if the API fails, the evm.log will contain a "DRb::DRbConnError: connection closed" error without any details of the API response. I was clueless and it took me some time to figure out that this was an API error. I had to look at Ansible tower httpd log and it was a HTTP 400 error. Did a tcpdump and found out: POST /api/v1/job_templates/5/launch/ HTTP/1.1 Authorization: Basic YWRtaW46c3lzdGVt User-Agent: Faraday v0.9.2 Content-Type: application/json Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3 Accept: */* Connection: close Host: xxxx Content-Length: 19 {"extra_vars":"{}"} HTTP/1.1 400 BAD REQUEST <followed by reason in the response> Version-Release number of selected component (if applicable): CF 4.1.1 How reproducible: Always Steps to Reproduce: 1. Add Ansible Tower as provider 2. Create a job template but without credentials 3. Launch the job template from CF Actual results: Exception without any further details why the API fails. Expected results: There should be better logging. Additional info:
Error messages are now properly parsed. Added error logging on errors. Added optional debug logging to aid in troubleshooting.
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(-)
https://github.com/ManageIQ/manageiq/pull/12996