Bug 1655683 - A proper and correct error message should be displayed during "Certificate Chain Test"
Summary: A proper and correct error message should be displayed during "Certificate Ch...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Hybrid Cloud Console (console.redhat.com)
Classification: Red Hat
Component: Client
Version: unspecified
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: jcrafts
QA Contact: Pavol Kotvan
Kevin Blake
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-03 17:01 UTC by Ashish Humbe
Modified: 2019-11-13 15:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-14 18:09:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ashish Humbe 2018-12-03 17:01:48 UTC
Description of problem:

When there is authenticated proxy used on insights client, the test-connection throws with incorrect error 

# redhat-access-insights --test-connection --verbose
2018-12-02 07:29:14,228    DEBUG insights.client.client Logging initialized
2018-12-02 07:29:14,228    DEBUG root Loaded initial egg: /var/lib/insights/last_stable.egg/insights
2018-12-02 07:29:14,228    DEBUG insights.client /usr/bin/gpg --verify --keyring /etc/insights-client/redhattools.pub.gpg /var/lib/insights/last_stable.egg.asc /var/lib/insights/last_stable.egg
2018-12-02 07:29:14,237    DEBUG insights.client GPG return code: 0
2018-12-02 07:29:14,551    DEBUG insights.client.client Logging initialized
2018-12-02 07:29:14,551     INFO insights.client.phase.v1 Running Connection Tests...
2018-12-02 07:29:14,551    DEBUG insights.client.connection NO PROXY: None
2018-12-02 07:29:14,551    DEBUG insights.client.connection CONF Proxy: http://proxy.example.com:1234
2018-12-02 07:29:14,557    ERROR insights.client.connection Connection test config:
2018-12-02 07:29:14,557    DEBUG insights.client.connection Proxy config: {'https': 'http://proxy.example.com:1234'}
2018-12-02 07:29:14,557    DEBUG insights.client.connection Certificate Verification: /etc/insights-client/cert-api.access.redhat.com.pem
2018-12-02 07:29:14,557     INFO insights.client.connection === Begin Certificate Chain Test ===
2018-12-02 07:29:14,563    ERROR insights.client.connection Failed to connect to https://cert-api.access.redhat.com/r/insights. Invalid hostname.
2018-12-02 07:29:14,563     INFO insights.client.connection === End Certificate Chain Test: FAILURE ===


Here we can see that the error message is:      Failed to connect to https://cert-api.access.redhat.com/r/insights. Invalid hostname.

The proper error message should be thrown on the console. 


How reproducible:
When there is an issue with the internet connection. 

Steps to Reproduce:
1. Setup Insights client to connect via authenticated HTTP Proxy
2. Try to run insights-client --test-connection 

Actual results:

"Begin Certificate Chain Test" fails with below error, the error message is incorrect. 

Failed to connect to https://cert-api.access.redhat.com/r/insights. Invalid hostname.

Expected results:
A proper and correct error message should be displayed.

Additional info:

Comment 1 jcrafts 2019-06-14 18:09:14 UTC
This test was removed from the connection tests.


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