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 1895037

Summary: Red Hat Insights Sync not working on Satellite 6.8
Product: Red Hat Satellite Reporter: Amar Huchchanavar <ahuchcha>
Component: RH Cloud - InsightsAssignee: Shimon Shtein <sshtein>
Status: CLOSED ERRATA QA Contact: Mirek Długosz <mzalewsk>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8.0CC: ahumbe, aruzicka, egolov, jakob.fuerneisen, mmccune
Target Milestone: 6.9.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_rh_cloud-2.0.13 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1908836 (view as bug list) Environment:
Last Closed: 2021-04-21 13:18:52 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
tfm-rubygem-foreman_rh_cloud-2.0.13.1-1.el7sat.noarch.rpm none

Description Amar Huchchanavar 2020-11-05 15:49:01 UTC
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'

Comment 1 Shimon Shtein 2020-11-09 15:46:21 UTC
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.

Comment 2 Mike McCune 2020-11-20 21:50:00 UTC
*** 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

Comment 3 Mike McCune 2020-11-20 21:52:14 UTC
Created attachment 1731493 [details]
tfm-rubygem-foreman_rh_cloud-2.0.13.1-1.el7sat.noarch.rpm

Comment 4 Mirek Długosz 2020-11-24 11:21:04 UTC
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 5 J.F. 2021-02-05 04:47:07 UTC
Tested with 6.8.2 (with no proxy set) and all solutions in 5583211 but still not working... do we have to wait for 6.9?

/var/log/foreman/production.log

2021-02-04T10:57:34 [I|app|d591deac] Processing by InsightsCloud::TasksController#create as JSON
2021-02-04T10:57:34 [I|app|d591deac]   Parameters: {"task"=>{}}
2021-02-04T10:57:34 [I|app|d591deac] Performing InsightsCloud::Async::InsightsFullSync (Job ID: 13e846a1-73b2-4d4e-9688-610a65c09d5b) from Dynflow(default) enqueued at 
2021-02-04T10:57:35 [I|app|d591deac] Performed InsightsCloud::Async::InsightsFullSync (Job ID: 13e846a1-73b2-4d4e-9688-610a65c09d5b) from Dynflow(default) in 916.96ms
2021-02-04T10:57:35 [I|app|d591deac] No template found for InsightsCloud::TasksController#create, rendering head :no_content
2021-02-04T10:57:35 [I|app|d591deac] Completed 204 No Content in 937ms (ActiveRecord: 6.0ms | Allocations: 17339)

See also: https://bugzilla.redhat.com/show_bug.cgi?id=1920014#

Comment 10 errata-xmlrpc 2021-04-21 13:18:52 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.9 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:1313