Bug 1973285 - insights-client --test-connection fails when using general "HTTP(S) proxy" setting of satellite.
Summary: insights-client --test-connection fails when using general "HTTP(S) proxy" se...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Inventory
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.10.0
Assignee: Shimon Shtein
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-17 14:41 UTC by Jameer Pathan
Modified: 2021-11-16 14:12 UTC (History)
7 users (show)

Fixed In Version: 4.0.26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1984550 (view as bug list)
Environment:
Last Closed: 2021-11-16 14:11:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:12:05 UTC

Description Jameer Pathan 2021-06-17 14:41:18 UTC
Description of problem:
insights-client --test-connection fails when using general "HTTP(S) proxy" setting of satellite.

Version-Release number of selected component (if applicable):
- Satellite 6.9.3 snap 3
- tfm-rubygem-foreman_rh_cloud-3.0.22-1.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
- Go to Settings > General and add http proxy in "HTTP(S) proxy" setting.
- Edit /etc/resolv.conf and comment out all entries so that satellite can not directly communicate outside.
- Register a host with satellite
- Registering host with insights
- Run "insights-client --test-connection"

Actual results:
[root@kvm-04-guest21 ~]# insights-client --test-connection --net-debug
GET https://dhcp-3-27.example.com:443/redhat_access/r/insights/v1/branch_info
GET branch_info status: 200
Running Connection Tests...
=== Begin Upload URL Connection Test ===
Testing: https://dhcp-3-27.example.com:443/redhat_access/r/insights/uploads/
HTTP Status Code: 200
HTTP Status Text: OK
HTTP Response Text: 
Successfully connected to: https://dhcp-3-27.example.com:443/redhat_access/r/insights/uploads/
=== End Upload URL Connection Test: SUCCESS ===

=== Begin API URL Connection Test ===
Testing: https://dhcp-3-27.example.com:443/redhat_access/r/insights/
HTTP Status Code: 500
HTTP Status Text: Internal Server Error
HTTP Response Text: {}
Connection failed
=== End API URL Connection Test: FAILURE ===

Connectivity tests completed with some errors
See /var/log/insights-client/insights-client.log for more details.


Expected results:
- "insights-client --test-connection" request is routed through http proxy defined in general "HTTP(S) proxy" setting of Satellite.

Additional info:
- insights-client register/unregister/status works fine.

Comment 4 Jameer Pathan 2021-08-12 13:24:12 UTC
Update around this bz:

In Satellite 6.10.0 snap 13 we have observed that this issue causes insights-client registration to fail.

Test steps:
- Try to register a satellite content host with insights using command generated from global registration page.

Observations:
- insights-client registration fails.

# Installing Insights client
#
Updating Subscription Management repositories.
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
Red Hat Ansible Engine 2.9 for RHEL 8 x86_64 (RPMs)                                                                           7.8 MB/s | 1.8 MB     00:00    
Package insights-client-3.0.13-1.el8_1.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
GET https://dhcp-2-121.example.com:443/redhat_access/r/insights/v1/branch_info
GET branch_info status: 200
Running Connection Tests...
=== Begin Upload URL Connection Test ===
Testing: https://dhcp-2-121.example.com:443/redhat_access/r/insights/uploads/
HTTP Status Code: 200
HTTP Status Text: OK
HTTP Response Text: 
Successfully connected to: https://dhcp-2-121.example.com:443/redhat_access/r/insights/uploads/
=== End Upload URL Connection Test: SUCCESS ===

=== Begin API URL Connection Test ===
Testing: https://dhcp-2-121.example.com:443/redhat_access/r/insights/
HTTP Status Code: 404
HTTP Status Text: Not Found
HTTP Response Text: {"status":404,"error":"Not Found"}
Connection failed
=== End API URL Connection Test: FAILURE ===

Connectivity tests completed with some errors
See /var/log/insights-client/insights-client.log for more details.
Host [dhcp-2-88.example.com] initial configuration failed

Comment 5 Jameer Pathan 2021-08-31 09:10:53 UTC
Verified:

Verified with:
- Satellite 6.10.0 snap 15
- tfm-rubygem-foreman_rh_cloud-4.0.26-1.el7sat.noarch

Test steps:
- Try registering content host with insights(with and without Default HTTP Proxy configured on satellite).

Observation:
- insights-client registration process finished successfully.
- "insights-client --test-connection" worked as expected.
- No traceback/error in satellite production.log

Comment 8 errata-xmlrpc 2021-11-16 14:11:58 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: Satellite 6.10 Release), 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-2021:4702


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