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 2224170 - Registering client host with Satellite using Global Registration Template shows "Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d"."
Summary: Registering client host with Satellite using Global Registration Template sho...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Registration
Version: 6.14.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.15.0
Assignee: Leos Stejskal
QA Contact: Gaurav Talreja
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-20 05:42 UTC by Jayant Bhatia
Modified: 2024-04-23 17:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-04-23 17:11:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 36938 0 Normal New Global Registration - ignore output of some commands 2023-11-22 14:20:11 UTC
Github theforeman foreman pull 9914 0 None open Fixes #36938 - Ignore output of some commands in Global Registration 2023-11-22 14:26:23 UTC
Red Hat Issue Tracker SAT-19115 0 None None None 2023-07-24 12:41:10 UTC
Red Hat Product Errata RHSA-2024:2010 0 None None None 2024-04-23 17:11:50 UTC

Description Jayant Bhatia 2023-07-20 05:42:00 UTC
Description of problem:

While registering client host with Satellite using Global registration Template, the registration is successful but below message is shown in the logs which leads to confusion for users.
~~~
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".
~~~


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


How reproducible: Always


Steps to Reproduce:
1. Navigate to Satellite WebUI -> Hosts -> Register Host and generate the curl command after filing all fields.
2. Take any RHEL machine which is either registered to a Satellite or registration was attempted on that RHEL machine before.
3. Run the curl command to register the client host with Satellite.


Actual results: Below message is seen in screen during the registration process which is confusing .

~~~
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".
~~~


Expected results: The above errors should not be generated during registration process

Comment 4 Leos Stejskal 2023-07-25 11:40:54 UTC
Hi,
this does not look like a bug in the registration, but rather a subscription.

See the error:
```
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: 5bb5cedf-133c-42fe-b45a-7656c346da23
The registered system name is: dhcp131-83.gsslab.pnq2.redhat.com
```

What repositories do you have enabled for the OS?

Comment 5 Jayant Bhatia 2023-07-26 02:16:47 UTC
The registration is always successful but observed error is misleading. I tried with RHEL-9 BaseOS and Appstream repo. The same error is observed irrespective of the repo being made available to the registered client host.

Comment 6 Leos Stejskal 2023-08-02 08:17:14 UTC
> The registration is always successful but the observed error is misleading.

The error is coming from the yum, or subscription-manager, not sure right now,
there isn't much we can do with it.

> The same error is observed irrespective of the repo being made available to the registered client host.

Can you share steps on how to reproduce the issue? This would mean that registration doesn't work
but we didn't get any issues from QAs nor from the customers, so I guess there are maybe some steps missing in the setup

Comment 7 Marek Hulan 2023-08-02 12:11:04 UTC
We could potentially silence the subscription-manager commands we run before the actual registration

https://github.com/theforeman/foreman/blob/90a5e4c341051915c8f915e7259f4b9673a25a2c/app/views/unattended/provisioning_templates/registration/global_registration.erb#L187

We already redirect stdout to /dev/null later

https://github.com/theforeman/foreman/blob/90a5e4c341051915c8f915e7259f4b9673a25a2c/app/views/unattended/provisioning_templates/registration/global_registration.erb#L198-L199

We could potentially also silence the STDERR, but at the same time, this may be needed while debugging.

Comment 9 Brad Buckingham 2023-10-30 11:29:29 UTC
Bulk setting Target Milestone = 6.15.0 where sat-6.15.0+ is set.

Comment 10 Leos Stejskal 2023-11-22 14:20:10 UTC
Created redmine issue https://projects.theforeman.org/issues/36938 from this bug

Comment 11 Bryan Kearney 2023-11-29 12:02:33 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36938 has been resolved.

Comment 12 Gaurav Talreja 2023-12-13 10:28:31 UTC
Verified.

Tested on Satellite 6.15.0 Snap 2.1

steps:
1. Navigate to Satellite WebUI -> Hosts -> Register Host and generate the curl command 
2. Run the curl command on any host to register it with Satellite

Observation:
Mentioned warning isn't part of the output now, which was appearing earlier due to subscription-manager package update, and its now silenced.
Also, the provided fix silences the command for katello-ca-consumer removal.

Comment 15 errata-xmlrpc 2024-04-23 17:11:48 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 (Important: Satellite 6.15.0 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-2024:2010


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