Bug 1781875

Summary: Red Hat Inventory Uploads does not use proxy
Product: Red Hat Satellite Reporter: Christian Marineau <cmarinea>
Component: RH Cloud - InventoryAssignee: Shimon Shtein <sshtein>
Status: CLOSED ERRATA QA Contact: Mirek Długosz <mzalewsk>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.6.0CC: ahumbe, bkearney, dyuen, fperalta, jjeffers, jtougne, ktordeur, mmccune, mzalewsk, pcreech, pdudley, pete.perfetti, sshtein, wclark
Target Milestone: 6.7.4Keywords: PrioBumpGSS, Reproducer, SubscriptionWatch
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_rh_cloud-1.0.10 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1874143 (view as bug list) Environment:
Last Closed: 2020-09-30 13:12:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screenshot with the upload error
none
Hotfix RPM for Satellite 6.7.3 none

Description Christian Marineau 2019-12-10 19:21:59 UTC
Created attachment 1643711 [details]
Screenshot with the upload error

Description of problem:
When trying to upload an inventory using "Red Hat Inventory Uploads", the task fails with an error.

Version-Release number of selected component (if applicable):
Satellite 6.6 (most likely affecting 6.5 as well)

How reproducible:
100%

Steps to Reproduce:
1. Have a Satellite configured to use a proxy for reaching out to external website.
2. Install the inventory upload plugin
   foreman-maintain packages install tfm-rubygem-foreman_inventory_upload-*
3. From the Webui, navigate to "RH Inventory" > "Manage"
4. Click on "Restart" to generate a new inventory"
5. Click on "Uploading"

Actual results:
* Failed to connect to 184.29.117.205: Network is unreachable
* couldn't connect to host at cert.cloud.redhat.com:443
* Closing connection 0
curl: (7) Failed to connect to 184.29.117.205: Network is unreachable
Uploaded files moved to done/ folder

Expected results:
If Satellite sits behind a proxy and it is correctly configured in Satellite, the inventory upload plugin should use it.

Additional info:
We should also document the requirements that https://cert.cloud.redhat.com need to be reachable

Comment 16 wclark 2020-08-26 18:56:23 UTC
Created attachment 1712734 [details]
Hotfix RPM for Satellite 6.7.3

Hotfix RPM is available for Satellite 6.7.3. This hotfix causes the inventory upload plugin to source proxy server configuration from Satellite's settings.

Installation instructions:

1. Make a backup of Satellite server

2. Download the attached file tfm-rubygem-foreman_rh_cloud-1.0.9-2.HOTFIXRHBZ1781875.el7sat.noarch.rpm and copy it to Satellite server

3. # yum install ./tfm-rubygem-foreman_rh_cloud-1.0.9-2.HOTFIXRHBZ1781875.el7sat.noarch.rpm --disableplugin=foreman-protector

4. # systemctl restart httpd

Comment 17 wclark 2020-08-26 20:36:02 UTC
Correction, this hotfix is for Satellite 6.7.2 which is the current latest release of Satellite 6.7

Comment 19 Patrick Creech 2020-09-03 15:45:37 UTC
Is there a 1.0.z version of rh_cloud with this fix in it?

Comment 20 Shimon Shtein 2020-09-07 15:30:28 UTC
Yes, the equivalent of 2.0.10 for 6.7 is 1.0.10

Comment 23 Mirek Długosz 2020-09-15 11:24:35 UTC
In Satellite 6.7.4, plugin will use Settings -> Content -> Default HTTP Proxy for report upload, and Settings -> General -> HTTP(S) proxy for hits and hosts availability sync from CRC.

There is upstream commit de6e0dcd4c7d056ff8ccc28f310afd082f72f996 that would make report upload use Settings -> Content -> Default HTTP Proxy and fall back to Settings -> General -> HTTP(S) proxy if first setting is not set. I reported bz#1874422 to tackle this discrepancy.

I am putting this bz to VERIFIED, since plugin in Satellite 6.7.4 does use proxy - but you need to set two different settings to get consistent behavior. Hopefully this will improve in future releases of plugin.


Tested on:
Satellite 6.7.4 snap 1
pulp-server-2.21.0.4-1.el7sat.noarch
foreman-1.24.1.28-2.el7sat.noarch
satellite-6.7.4-1.el7sat.noarch
katello-3.14.0-6.el7sat.noarch
tfm-rubygem-foreman_rh_cloud-1.0.10-1.el7sat.noarch

Comment 28 errata-xmlrpc 2020-09-30 13:12:09 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: Satellite 6.7.4 Async Bug Fix Update), 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-2020:4127