Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1908836

Summary: Red Hat Insights Sync not working on Satellite 6.8
Product: Red Hat Satellite Reporter: James Jeffers <jjeffers>
Component: RH Cloud - InsightsAssignee: Shimon Shtein <sshtein>
Status: CLOSED ERRATA QA Contact: Jameer Pathan <jpathan>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.8.0CC: ahumbe, aruzicka, egolov, mmccune, pcreech, sshtein
Target Milestone: 6.8.3Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1895037 Environment:
Last Closed: 2021-01-28 19:40:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Jeffers 2020-12-17 17:40:18 UTC
+++ This bug was initially created as a clone of Bug #1895037 +++

Description of problem:
Configure 'Red Hat Insights Sync' with the help of below doc -

> 2.4. Configuring Red Hat Insights Synchronization on Satellite  : 
https://access.redhat.com/documentation/en-us/red_hat_insights/2020-10/html-single/remediating_issues_across_your_red_hat_satellite_infrastructure_using_red_hat_insights/index#configuring-insights-sync-on-satellite_remediating-satellite

Satellite UI -> Hosts -> All Hosts: Insights column does not have any information. 

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

How reproducible:
Always

Steps to Reproduce:
1. Configure - 2.4. Configuring Red Hat Insights Synchronization on Satellite -https://access.redhat.com/documentation/en-us/red_hat_insights/2020-10/html-single/remediating_issues_across_your_red_hat_satellite_infrastructure_using_red_hat_insights/index#configuring-insights-sync-on-satellite_remediating-satellite 
2.Satellite UI -> Configure -> Insights -> Sync now
3.Satellite UI -> Hosts -> All Hosts: Insights column does not have any information. 

Actual results:
Insights column is blank.

Expected results:
It should show the recommendation.

Additional info:

Production Logs:
==> /var/log/foreman/production.log <==
2020-11-05T21:08:59 [I|app|4c27f25f] Started POST "/insights_cloud/tasks" for 10.74.9.76 at 2020-11-05 21:08:59 +0530
2020-11-05T21:08:59 [I|app|4c27f25f] Processing by InsightsCloud::TasksController#create as JSON
2020-11-05T21:08:59 [I|app|4c27f25f]   Parameters: {"task"=>{}}
2020-11-05T21:08:59 [I|app|4c27f25f] Performing InsightsCloud::Async::InsightsFullSync (Job ID: bc184a3f-be11-4178-866f-10a7ff7d794b) from Dynflow(default) enqueued at 
2020-11-05T21:08:59 [E|app|4c27f25f] Error performing InsightsCloud::Async::InsightsFullSync (Job ID: bc184a3f-be11-4178-866f-10a7ff7d794b) from Dynflow(default) in 0.52ms: URI::InvalidURIError (bad URI(is not URI?): ):
/opt/rh/rh-ruby25/root/usr/share/ruby/uri/rfc3986_parser.rb:18:in `rescue in split'
/opt/rh/rh-ruby25/root/usr/share/ruby/uri/rfc3986_parser.rb:15:in `split'
/opt/rh/rh-ruby25/root/usr/share/ruby/uri/rfc3986_parser.rb:73:in `parse'
/opt/rh/rh-ruby25/root/usr/share/ruby/uri/common.rb:237:in `parse'

--- Additional comment from  on 2020-11-09T15:46:21Z 

This should be fixed in 2.0.13 (https://github.com/theforeman/foreman_rh_cloud/commit/2b9a160a47c7bed7b57c5107a15eabd968ddd1fb).

Root cause: on clean Satellite all proxies are not set, so internally they return nil value.

Workaround: Set http_proxy setting to an empty string in the settings page.

--- Additional comment from  on 2020-11-20T21:50:00Z 


*** Satellite 6.8.0 and 6.8.1 Hotfix Available ***

1) Download tfm-rubygem-foreman_rh_cloud-2.0.13.1-1.el7sat.noarch.rpm from this bugzilla to your Satellite

2) Install:

rpm -Uvh tfm-rubygem-foreman_rh_cloud-2.0.13.1-1.el7sat.noarch.rpm
foreman-rake db:migrate

3) restart:

satellite-maintain service restart

5) resume operations

--- Additional comment from  on 2020-11-20T21:52:14Z 

Created attachment 1731493 [details]
tfm-rubygem-foreman_rh_cloud-2.0.13.1-1.el7sat.noarch.rpm

--- Additional comment from  on 2020-11-24T11:21:04Z 

On clean Satellite, with no proxy set in Settings, all network operations of plugin work as expected:
- uploading inventory report
- synchronizing hits data
- synchronizing hosts data


Tested on:
Satellite 6.9 snap 2
satellite-6.9.0-0.1.beta.el7sat.noarch
pulp-server-2.21.4-1.el7sat.noarch
foreman-2.3.0-0.7.rc2.el7sat.noarch
katello-3.18.0-0.1.rc1.el7sat.noarch
tfm-rubygem-foreman_rh_cloud-2.0.13.1-1.el7sat.noarch

Comment 2 Jameer Pathan 2021-01-15 09:09:03 UTC
Verified:

Verified with:
- Satellite 6.8.3 snap 1

Test steps:
- No http proxy set in settings.(http_proxy and content_default_http_proxy)
- Configured Red Hat Insights Synchronization on Satellite.
- Satellite UI -> Configure -> Insights -> Sync now
- Satellite UI -> Hosts -> All Hosts

Observation:
- successfully uploaded inventory report, synchronized hits and hosts data.
- Insights column shown recommendations for host.

Comment 7 errata-xmlrpc 2021-01-28 19:40:57 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 (Satellite 6.8.3 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/RHBA-2021:0302