Bug 2051752 - 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.4.z
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: rhacm-2.4.5
Assignee: Kevin Cormier
QA Contact: Derek Ho
Mikela Dockery
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-08 00:23 UTC by Derek Ho
Modified: 2022-06-27 17:04 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2079909 (view as bug list)
Environment:
Last Closed: 2022-06-27 17:04:01 UTC
Target Upstream Version:
Embargoed:
dho: qe_test_coverage+
bot-tracker-sync: rhacm-2.4.z+


Attachments (Terms of Use)
Screenshot for the problem (31.24 KB, image/png)
2022-02-08 00:23 UTC, Derek Ho
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github stolostron backlog issues 19764 0 None None None 2022-02-08 04:03:43 UTC
Red Hat Product Errata RHSA-2022:5201 0 None None None 2022-06-27 17:04:31 UTC

Description Derek Ho 2022-02-08 00:23:49 UTC
Created attachment 1859683 [details]
Screenshot for the problem

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 14:15:09 UTC
G2Bsync 1112246282 comment 
 chenz4027 Thu, 28 Apr 2022 14:03:56 UTC 
 G2Bsync 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.

@KevinFCormier Do we still plan to put the fix for 2.4.5?

Comment 9 errata-xmlrpc 2022-06-27 17:04:01 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 (Moderate: Red Hat Advanced Cluster Management 2.4.5 security updates 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:5201


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