Bug 1367918

Summary: Missing Reverse Proxy configuration to allow host registration to Insights through the RHN Proxy
Product: Red Hat Satellite Proxy 5 Reporter: Lindani Phiri <lphiri>
Component: InstallerAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED ERRATA QA Contact: Patrik Segedy <psegedy>
Severity: medium Docs Contact:
Priority: medium    
Version: 570CC: chenders, galtukho, ggainey, psegedy, tlestach, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-proxy-installer-2.3.0-7-sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1376036 (view as bug list) Environment:
Last Closed: 2016-10-06 20:19:34 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:
Bug Depends On:    
Bug Blocks: 465198, 1368978, 1376036    

Description Lindani Phiri 2016-08-17 19:37:38 UTC
Description of problem:

RHEL hosts registered via an RHN proxy server cannot register to the Insights service.  Deployment is as follows:

RHEL Host --> RHN Proxy --> Satellelite 5 Server --> Red Hat Insights Service

This is a supported configuration and should work without explicit configuration
on the RHN proxy.

The RHN Proxy configuration script should automatically set up the following reverse proxy rule in the its httpd configuration:

  ProxyPass   /redhat_access https://<satserver_ip>/redhat_access
  ProxyPassReverse /redhat_access https://<satserver_ip>/redhat_access


Version-Release number of selected component (if applicable): 5.7


How reproducible:


Steps to Reproduce:
1. Setup Host--> RHN Proxy --> Satellite 5 server
2. Attempt to register host to Insights service (redhat-access-insights --register)


Actual results:
Registration fails with an HTTP 404 exception


Expected results:

Registration should work , with the RHN proxy acting as a reverse proxy to the main Satellite server.


Additional info:

Comment 1 Lindani Phiri 2016-08-17 19:39:00 UTC
See linked customer case.

Comment 5 Gennadii Altukhov 2016-09-12 14:00:15 UTC
Starting work on this bug...

Comment 6 Gennadii Altukhov 2016-09-14 13:32:54 UTC
Added config for Red Hat Insights service.
Patch is available in upstream (spacewalk.git):

09bc079c61144a8acece5ff9639d76efa208e258

Switching to modified...

Comment 9 Grant Gainey 2016-09-21 16:26:21 UTC
*** Bug 1376036 has been marked as a duplicate of this bug. ***

Comment 10 Patrik Segedy 2016-09-22 09:33:57 UTC
Steps to verify:

spacewalk-proxy-installer-2.3.0-6.el6sat.noarch
1. Setup Host--> RHN Proxy --> Satellite 5 server
2. redhat-access-insights --register
2016-09-22 03:11:07,691 DEBUG hostname: <proxy hostname> ip: 10.16.64.79
2016-09-22 03:11:07,695 DEBUG Obtaining branch information from https://<proxy hostname>/redhat_access/r/insights/v1/branch_info
2016-09-22 03:11:07,733 DEBUG GET branch_info status: 404
2016-09-22 03:11:07,733 DEBUG 
2016-09-22 03:11:07,733 DEBUG Failed to parse response from Satellite 5
2016-09-22 03:11:07,733 WARNING Could not auto configure, falling back to static config
2016-09-22 03:11:07,733 WARNING See /var/log/redhat-access-insights/redhat-access-insights.log for additional information

3. There is no /etc/httpd/conf.d/insights-proxy.conf on RHN Proxy
--------------------------------------------------------------

With new package spacewalk-proxy-installer-2.3.0-7.el6sat.noarch
1. Setup Host--> RHN Proxy --> Satellite 5 server
2. redhat-access-insights --register is OK
3. There is configured /etc/httpd/conf.d/insights-proxy.conf
/etc/httpd/conf.d/insights-proxy.conf:ProxyPass   /redhat_access https://<satellite hostname>/redhat_access
/etc/httpd/conf.d/insights-proxy.conf:ProxyPassReverse /redhat_access https://<satellite hostname>/redhat_access

Comment 12 errata-xmlrpc 2016-10-06 20:19:34 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, 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://rhn.redhat.com/errata/RHBA-2016-2037.html