Bug 2079909 - Wrong message is displayed when GRC fails to connect to an ansible tower
Summary: Wrong message is displayed when GRC fails to connect to an ansible tower
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Advanced Cluster Management for Kubernetes
Classification: Red Hat
Component: Console
Version: rhacm-2.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: rhacm-2.5
Assignee: magchen@redthat.com
QA Contact: Derek Ho
Christopher Dawson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-28 13:25 UTC by Kevin Cormier
Modified: 2022-06-09 02:12 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2051752
Environment:
Last Closed: 2022-06-09 02:11:57 UTC
Target Upstream Version:
Embargoed:
bot-tracker-sync: rhacm-2.5+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github stolostron backlog issues 22050 0 None None None 2022-04-28 15:35:32 UTC
Red Hat Product Errata RHSA-2022:4956 0 None None None 2022-06-09 02:12:08 UTC

Description Kevin Cormier 2022-04-28 13:25:12 UTC
+++ This bug was initially created as a clone of Bug #2051752 +++

Description of the problem:
When the ansible tower was down, the GRC panel failed to connect. However, instead of displaying more informative message such as "connection timeout", the GRC panel displayed message like "JSON.parse: unexpected character at line 1 column 1 of the JSON data"

Release version:
2.4.z

Operator snapshot version:

OCP version:
4.9.18

Browser Info:
Firefox

Steps to reproduce:
1. Configure an Ansible Automation Platform credential
2. Deploy a policy and configure an automation ansible job
3. With the associated ansible tower down, select the created credential
4. GRC attempted to connect to the tower to retrieve available ansible jobs

Actual results:
The connection ended with message, "JSON.parse: unexpected character at line 1 column 1 of the JSON data"

Expected results:
Should be some message like "Connection timed out"

Additional info:

Comment 1 bot-tracker-sync 2022-04-28 15:35:38 UTC
G2Bsync 1112353629 comment 
 KevinFCormier Thu, 28 Apr 2022 15:33:07 UTC 
 G2Bsync From @chenz4027 : The fix will enhance the notification to make it more informative. However, the root cause of this issue - the fetch for an ansible secret with invalid url and invalid token is not resolved. What happened was that the fetch will stuck in pending state instead of immediate timeout. After discussed with @jamestalton, The ideal way to handle this behavior is to introduce https://www.npmjs.com/package/ky to timeout, but we believe it is pretty risky to introduce a new library now. Will open a doc issue to doc this behavior. If the user is on this page, they will eventually time out and see the enhanced error message.

Comment 6 errata-xmlrpc 2022-06-09 02:11:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Red Hat Advanced Cluster Management 2.5 security updates, images, and bug fixes), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:4956


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