Bug 1611621

Summary: [RFE] Update Insights Plugin to use the new 'disconnected' option in Satellite 6.4
Product: Red Hat Satellite Reporter: Rich Jerrido <rjerrido>
Component: RH Cloud - InsightsAssignee: Shimon Shtein <sshtein>
Status: CLOSED ERRATA QA Contact: Jameer Pathan <jpathan>
Severity: high Docs Contact:
Priority: high    
Version: 6.3.1CC: ahumbe, bkearney, dvoss, ehelms, jpathan, lphiri, mawerner, mhulan, mmccune, ngalvin, rexwhite, robwilli, sshtein, wclark
Target Milestone: 6.10.0Keywords: FutureFeature, PrioBumpField, PrioBumpGSS, PrioBumpPM
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-redhat_access-2.2.16 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:08:27 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:

Description Rich Jerrido 2018-08-02 13:33:48 UTC
Currently today, Insights uses the CDN URL as an indicator of whether or
not the Satellite can reach the Insights service. In _most_ scenarios
this is correct, there are customer deployments which aren't disconnected, but does get Red Hat content from somewhere other than cdn.redhat.com, this heuristic isn't as accurate.

Today for these customers, we ensure that they: 

  (1)Must be able to connect to https://cert-api.access.redhat.com
  (2) Must have a valid production manifest (Insights uses the
  remote consumer TLS certificate embedded in the manifest to
  authenticate to the Insights service)
  (3) Must be patched  to override disconnected
  check (/opt/theforeman/tfm/root/usr/share/gems/gems/redhat_access-
2.0.13/app/services/redhat_access/telemetry/look_ups.rb )


In Satellite 6.4, we have a new setting
(https://www.awesomescreenshot.com/image/3525939/10bb3f2f8d7a0ba5f310fe3df14e3624)
that is to be used to denote disconnected Satellites. 

I would like to update the Insights plugin to use this value in lieu of keying off of the CDN URL.

Comment 1 Rich Jerrido 2019-04-25 17:12:48 UTC
*** Bug 1702081 has been marked as a duplicate of this bug. ***

Comment 2 Andrew Puch 2019-09-11 20:50:02 UTC
Adding info for a RFE/support exception for a customer.  

Old duplicated case that was closed ,
due to this case as prime / head case / new case -> https://bugzilla.redhat.com/show_bug.cgi?id=1611621
 
Old duplicated case: https://bugzilla.redhat.com/show_bug.cgi?id=1702081

As there is not much difference from a disconnected sat to a hub/cdn sat and disconnected sat / spoke, as is is the same pattern , 
the only level of detail is the governance / compliance of the transport of the CDN repos aka import via http or file system (nfs, sneaker net , etc) . 

 

wclark 2019-04-22 22:13:43 UTC

The RFE is for full support of a Hub/Spoke architecture where multiple 'spoke' Satellites are synced from a single 'Hub' Satellite which syncs from the CDN.

Currently limited support requires the following change to rubygem-foreman-redhat_access, which gets overwritten every time the package is updated (due to the path changing when the version is updated):

/opt/theforeman/tfm/root/usr/share/gems/gems/redhat_access-2.2.0/app/services/redhat_access/telemetry/look_ups.rb

Here is the diff:

# diff look_ups.rb look_ups.rb.041919
68c68,73
<         return false
---
>         if org
>           # TODO: fix hard coding
>           org.redhat_repository_url != 'https://cdn.redhat.com'
>         else
>           raise(RecordNotFound, 'Organization not found or invalid')
>         end

Comment 10 Rex White 2020-08-10 16:19:20 UTC
Marek,

The fix for this got entangled with some other work I was doing but that other work is dragging on so I'm just going to refactor things and push a gem with the fix for this hopefully this afternoon.

- Rex

Comment 17 Jameer Pathan 2021-08-18 14:20:23 UTC
Verified:

Verified with:
- Satellite 6.10.0 snap 13
- tfm-rubygem-foreman_rh_cloud-4.0.25.1-2.el7sat.noarch

Observations:
- If "Disconnected mode" setting is enabled then RH cloud plugin won't upload inventory reports and
satellite will show "Upload was stopped since disconnected mode setting is enabled for content on this instance." message.
- If "host_registration_insights" parameter is set to false for content hosts then insights-client uploads
from those hosts will be rejected by satellite.

[root@dhcp-2-136 ~]# insights-client 
Unable to fetch egg url. Defaulting to /release
ERROR: Could not download dynamic configuration
Debug Info: 
Conf status: 403
Debug Info: 
Conf message: {"message":"Telemetry is not enabled for this host"}
This machine has not yet been registered. Use --register to register this machine.

Comment 20 errata-xmlrpc 2021-11-16 14:08:27 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