Bug 1917299

Summary: Satellite-installer failed to register Satellite with Red Hat Insights.
Product: Red Hat Satellite Reporter: Jameer Pathan <jpathan>
Component: InstallationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Jameer Pathan <jpathan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: ehelms
Target Milestone: 6.9.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: satellite-installer-6.9.0.10-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 13:25:36 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 Jameer Pathan 2021-01-18 09:21:54 UTC
Description of problem:
Error while registering Satellite with Red Hat Insights.

Version-Release number of selected component (if applicable):
- Satellite 6.9.0 snap 9

How reproducible:


Steps to Reproduce:
1. Install Satellite 6.9.0 snap 9
2. Run "satellite-installer --register-with-insights"

Actual results:
satellite-installer failed with following error:

2021-01-18 03:55:38 [NOTICE] [post] Registering the system with Red Hat Insights
Traceback (most recent call last):
	14: from /usr/sbin/satellite-installer:8:in `<main>'
	13: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.1.2/lib/kafo/kafo_configure.rb:50:in `run'
	12: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
	11: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.1.2/lib/kafo/kafo_configure.rb:169:in `run'
	10: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
	 9: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.1.2/lib/kafo/kafo_configure.rb:205:in `execute'
	 8: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.1.2/lib/kafo/kafo_configure.rb:521:in `run_installation'
	 7: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.1.2/lib/kafo/hooking.rb:51:in `execute'
	 6: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.1.2/lib/kafo/hooking.rb:51:in `each'
	 5: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.1.2/lib/kafo/hooking.rb:53:in `block in execute'
	 4: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.1.2/lib/kafo/hook_context.rb:19:in `execute'
	 3: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.1.2/lib/kafo/hook_context.rb:19:in `instance_eval'
	 2: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.1.2/lib/kafo/hooking.rb:35:in `block (4 levels) in load'
	 1: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.1.2/lib/kafo/hooking.rb:35:in `instance_eval'
/usr/share/foreman-installer/katello/hooks/post/25-register_with_insights.rb:14:in `block (4 levels) in load': undefined method `warning' for #<Kafo::Logger:0x0000000002656c90> (NoMethodError)
Did you mean?  warn


Expected results:
- Successfully able to register Satellite with Red Hat Insights.

Additional info:

Comment 4 Jameer Pathan 2021-02-05 09:09:15 UTC
Verified 

Verified with:
- Satellite 6.9.0 snap 12
- satellite-installer-6.9.0.10-1.el7sat.noarch

Test steps:
- Run "satellite-installer --register-with-insights" when satellite is not registered to the portal.

satellite-installer output:

2021-02-05 03:58:55 [NOTICE] [post] Executing hooks in group post
  Success!
  * Satellite is running at https://satellite.example.com

  * To install an additional Capsule on separate machine continue by running:

      capsule-certs-generate --foreman-proxy-fqdn "$CAPSULE" --certs-tar "/root/$CAPSULE-certs.tar"
  * Capsule is running at https://satellite.example.com:9090

  The full log is at /var/log/foreman-installer/satellite.log
Package versions are being locked.
2021-02-05 03:58:57 [NOTICE] [post] Registering the system with Red Hat Insights
2021-02-05 03:59:07 [WARN  ] [post] Insights registration failed. Please check 'insights-client --test-connection' for more details.
2021-02-05 03:59:07 [NOTICE] [post] All hooks in group post finished

*******************************************************************************************************
- Run "satellite-installer --register-with-insights" when satellite is registered to the portal.
satellite-installer output:

2021-02-05 02:50:05 [NOTICE] [post] Executing hooks in group post
  Success!
  * Satellite is running at https://satellite.example.com

  * To install an additional Capsule on separate machine continue by running:

      capsule-certs-generate --foreman-proxy-fqdn "$CAPSULE" --certs-tar "/root/$CAPSULE-certs.tar"
  * Capsule is running at https://satellite.example.com:9090

  The full log is at /var/log/foreman-installer/satellite.log
Package versions are being locked.
2021-02-05 02:50:07 [NOTICE] [post] Registering the system with Red Hat Insights
2021-02-05 02:51:01 [NOTICE] [post] All hooks in group post finished

[root@hp-z840-01 ~]# insights-client --status
System is registered locally via .registered file. Registered at 2021-02-05T02:50:23.239837
Insights API confirms registration.

Comment 7 errata-xmlrpc 2021-04-21 13:25:36 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