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 2107345 - Registration of a new host does not register host with insights when specified.
Summary: Registration of a new host does not register host with insights when specified.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Registration
Version: 6.11.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 6.12.0
Assignee: satellite6-bugs
QA Contact: Sam Bible
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-14 18:54 UTC by Matthew Yee
Modified: 2023-09-18 04:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-20 16:41:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
video of the bug (6.30 MB, image/gif)
2022-07-19 15:27 UTC, Matthew Yee
no flags Details
insights-client not registered (1.75 MB, video/mp4)
2022-07-19 15:38 UTC, Matthew Yee
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 2054044 0 unspecified CLOSED Registering hosts with Setup REX is not copying Satellite's foreman-proxy public keys on the host. 2022-12-22 16:01:57 UTC
Red Hat Issue Tracker SAT-15091 0 None None None 2023-01-24 18:32:13 UTC

Description Matthew Yee 2022-07-14 18:54:40 UTC
Description of problem:
Satellite server is configured to synchronize inventory with Insights through RHC.
When registering a new host to the Satellite server, Setup Insights doesn't actually setup insights on the new host.


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

How reproducible:
Very

Steps to Reproduce:
1.Make sure Setup Insights is set to yes.
2.Register a new host to the Satellite server.
3.

Actual results:
Host is not registered.

Expected results:
Host is registered.


Additional info:

Comment 2 Leos Stejskal 2022-07-19 12:23:16 UTC
Hi,
can you post the log from the registration script?

Comment 3 Matthew Yee 2022-07-19 14:26:10 UTC
Here's the terminal output. Where's the log stored?

[root@ip-172-31-29-7 ~]# curl -sS --insecure 'https://172.31.29.10/register?activation_keys=RHEL8&force=true&ignore_subman_errors=true&lifecycle_environment_id=3&location_id=2&organization_id=1&update_packages=false' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJpYXQiOjE2NTgyNDA0NjQsImp0aSI6ImFlOWZiMzg3NDdhNzk2YWU2YTJlMmRmZWM1NTU3YWVlZGJhNDBjZGQ0ZjIwY2I5ZTBlMTI0NmUwYWZiMjdhOGUiLCJleHAiOjE2NTgyNTQ4NjQsInNjb3BlIjoicmVnaXN0cmF0aW9uI2dsb2JhbCByZWdpc3RyYXRpb24jaG9zdCJ9.N8vYv5DV35QjB7B2eg0IDh2NfVihVEHskfteL2-eltg' | bash
#
# Running registration
#
This system is currently not registered.
All local data removed
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

No match for argument: katello-ca-consumer*
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
The system has been registered with ID: 85b74af3-f43e-4958-8a66-75f2b221232b
The registered system name is: ip-172-31-29-7.us-west-1.compute.internal
curl: (51) SSL: no alternative certificate subject name matches target host name '172.31.29.10'

Comment 4 Matthew Yee 2022-07-19 15:27:08 UTC
Created attachment 1898130 [details]
video of the bug

Comment 5 Matthew Yee 2022-07-19 15:38:20 UTC
Created attachment 1898143 [details]
insights-client not registered

Comment 6 Leos Stejskal 2022-07-20 06:48:05 UTC
As you can see from the registration command output, registration failed before the installation of insights-client:
curl: (51) SSL: no alternative certificate subject name matches target host name '172.31.29.10'

The reason why it failed is that in registration we do not support callbacks to satellite running only on IP address, due to certificates and SSL - certificates are tied to the domain.

This is correct and expected behavior (see https://bugzilla.redhat.com/show_bug.cgi?id=2054044), try the registration on Satellite that is running on some domain.

Comment 7 Matthew Yee 2022-07-20 16:41:59 UTC
This satellite server is running in AWS with an FQDN.

[ec2-user@ip-172-31-29-10 ~]$ hostnamectl status
   Static hostname: ip-172-31-29-10.us-west-1.compute.internal
         Icon name: computer-vm
           Chassis: vm
        Machine ID: ec24c2a9f43bd4d7f0c200937030140b
           Boot ID: 269414918a9949eea7e3c2f138fb89f4
    Virtualization: kvm
  Operating System: Red Hat Network
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.9:GA:server
            Kernel: Linux 3.10.0-1160.71.1.el7.x86_64
      Architecture: x86-64

[root@ip-172-31-29-9 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Unknown

System Purpose Status: Unknown

[root@ip-172-31-29-9 ~]# curl -sS --insecure 'https://ip-172-31-29-10.us-west-1.compute.internal/register?activation_keys=RHEL9&force=true&ignore_subman_errors=true&lifecycle_environment_id=3&location_id=2&organization_id=1&update_packages=false' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJpYXQiOjE2NTgzMzUxNDEsImp0aSI6IjcxZGU1YTRiMTY0MjZkYWY3NTIwMTgxM2IxOTZjNWY4NmE5NDE5ZDY4MGNhMWZhZjZhYmRiM2M2ODg3MjBmMjEiLCJleHAiOjE2NTgzNDk1NDEsInNjb3BlIjoicmVnaXN0cmF0aW9uI2dsb2JhbCByZWdpc3RyYXRpb24jaG9zdCJ9.R0is3xUNSUnw1H0SdpX1fsXKusp1Km1ieRwAlfZg1_k' | bash
#
# Running registration
#
This system is currently not registered.
All local data removed
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

No match for argument: katello-ca-consumer*
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".The system has been registered with ID: 8c9275cf-40b9-4167-9fa1-4355b4f281cd
The registered system name is: ip-172-31-29-9.us-west-1.compute.internal
# Running [ip-172-31-29-9.us-west-1.compute.internal] host initial configuration
/sbin/restorecon
#
# Installing Insights client
#
Updating Subscription Management repositories.
Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs)                     7.8 MB/s | 2.9 MB     00:00
Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs)                   16 MB/s | 8.4 MB     00:00
Package insights-client-3.1.7-6.el9_0.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
GET https://ip-172-31-29-10.us-west-1.compute.internal:443/redhat_access/r/insights/v1/branch_info
HTTP Status: 200 OK
HTTP Response Text: {"remote_leaf":"8c9275cf-40b9-4167-9fa1-4355b4f281cd","remote_branch":"1f7d704f-22ae-44b6-8b14-b06131501a6d","display_name":"Acme Org","hostname":"ip-172-31-29-10.us-west-1.compute.internal","product":{"type":"Satellite","major_version":"6","minor_version":"11"},"organization_id":1,"satellite_instance_id":"55bd4b4f-a5fc-4459-ab88-25ffaf8c2513","labels":[{"namespace":"satellite","key":"location","value":"Vancouver"},{"namespace":"satellite","key":"location","value":"Vancouver"},{"namespace":"satellite","key":"organization","value":"Acme Org"},{"namespace":"satellite","key":"lifecycle_environment","value":"Test"},{"namespace":"satellite","key":"content_view","value":"RHEL9"},{"namespace":"satellite","key":"activation_key","value":"RHEL9"},{"namespace":"satellite","key":"satellite_instance_id","value":"55bd4b4f-a5fc-4459-ab88-25ffaf8c2513"},{"namespace":"satellite","key":"organization_id","value":"1"}]}
Running Connection Tests...
=== Begin Upload URL Connection Test ===
Testing: https://ip-172-31-29-10.us-west-1.compute.internal:443/redhat_access/r/insights/uploads/
POST https://ip-172-31-29-10.us-west-1.compute.internal:443/redhat_access/r/insights/uploads/
HTTP Status: 200 OK
HTTP Response Text: {"request_id":"8c1f7530daa34d9186a1e3da51606f9d","upload":{"account_number":"6160438","org_id":"12136146"}}
Successfully connected to: https://ip-172-31-29-10.us-west-1.compute.internal:443/redhat_access/r/insights/uploads/
=== End Upload URL Connection Test: SUCCESS ===

=== Begin API URL Connection Test ===
Testing: https://ip-172-31-29-10.us-west-1.compute.internal:443/redhat_access/r/insights/
GET https://ip-172-31-29-10.us-west-1.compute.internal:443/redhat_access/r/insights/
HTTP Status: 200 OK
HTTP Response Text: {"status":"available"}
Successfully connected to: https://ip-172-31-29-10.us-west-1.compute.internal:443/redhat_access/r/insights/
=== End API URL Connection Test: SUCCESS ===

Connectivity tests completed successfully
See /var/log/insights-client/insights-client.log for more details.
Successfully registered host ip-172-31-29-9.us-west-1.compute.internal
Automatic scheduling for Insights has been enabled.
Starting to collect Insights data for ip-172-31-29-9.us-west-1.compute.internal
Uploading Insights data.
Successfully uploaded report from ip-172-31-29-9.us-west-1.compute.internal to account 6160438.
View the Red Hat Insights console at https://console.redhat.com/insights/
Refreshing subscription data
All local data refreshed
Host [ip-172-31-29-9.us-west-1.compute.internal] successfully configured.
Successfully updated the system facts.

Looks like it works as you say it does. Thanks!

Comment 8 Red Hat Bugzilla 2023-09-18 04:41:57 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


Note You need to log in before you can comment on or make changes to this bug.