RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 2132242 - Gathering information about DNF profile blocks registration process
Summary: Gathering information about DNF profile blocks registration process
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.9
Assignee: Jiri Hnidek
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On: 2131789
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-10-05 08:26 UTC by Jiri Hnidek
Modified: 2023-11-14 17:58 UTC (History)
3 users (show)

Fixed In Version: subscription-manager-1.28.38-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2131789
Environment:
Last Closed: 2023-11-14 15:47:57 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 3242 0 None Merged 2132242: [1.28] Outsource uploading DNF profile to rhsmcertd 2023-04-28 12:37:04 UTC
Red Hat Issue Tracker RHELPLAN-135630 0 None None None 2022-10-05 09:49:09 UTC
Red Hat Product Errata RHBA-2023:7092 0 None None None 2023-11-14 15:48:15 UTC

Description Jiri Hnidek 2022-10-05 08:26:15 UTC
+++ This bug was initially created as a clone of Bug #2131789 +++

Description of problem:
DNF profile is gathered and uploaded to server at the end of registration process. When DNF has to first download some metadata from 3rd party repository (like Google Cloud SDK), then registration is blocked until metadata are downloaded. It can take several minutes and this is activity is not communicated to user (no status message about this is displayed). It looks like that registration is stuck.

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

[root@rhel9 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 4.0.18-3
subscription management rules: 5.41
subscription-manager: 1.29.30-1.el9_0

How reproducible:
100%

Steps to Reproduce:
1. Create following yum repo file for Google Cloud SDK

/etc/yum.repos.d/google-cloud-sdk.repo

with following content:

[google-cloud-sdk]
name=Google Cloud SDK
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg

2. Try to register system using subscription-manager

[root@rhel9 ~]# subscription-manager register --username REDACTED --password REDACTED


Actual results:
Registration is blocked during gathering of DNF profile and this activity is not communicated using live status message like other actions ("Fetching organizations", "Registering", etc.) The process could be blocked for very long time (minutes).

Expected results:
Registration is not blocked by gathering and uploading DNF profile.

Additional info:

Comment 5 John Sefler 2023-05-11 20:24:56 UTC
Demonstrating slow registration (caused by downloading a lot of repo metadata)...

[root@kvm-01-guest11 ~]# rpm -q subscription-manager
subscription-manager-1.28.37-1.el8.x86_64
[root@kvm-01-guest11 ~]# 
[root@kvm-01-guest11 ~]# yum clean all --quiet
[root@kvm-01-guest11 ~]# 
[root@kvm-01-guest11 ~]# yum repolist enabled --verbose | tail -1
beaker-AppStream                                 65 MB/s | 8.1 MB     00:00    
beaker-AppStream-debuginfo                       63 MB/s | 6.0 MB     00:00    
beaker-BaseOS                                    50 MB/s | 2.4 MB     00:00    
beaker-BaseOS-debuginfo                          41 MB/s | 1.8 MB     00:00    
beaker-CRB                                       50 MB/s | 2.3 MB     00:00    
beaker-CRB-debuginfo                             19 MB/s | 528 kB     00:00    
beaker-HighAvailability                          22 MB/s | 600 kB     00:00    
beaker-HighAvailability-debuginfo               1.0 MB/s |  18 kB     00:00    
beaker-NFV                                       30 MB/s | 886 kB     00:00    
beaker-NFV-debuginfo                             12 MB/s | 329 kB     00:00    
beaker-RT                                        30 MB/s | 884 kB     00:00    
beaker-RT-debuginfo                              13 MB/s | 329 kB     00:00    
beaker-ResilientStorage                          18 MB/s | 603 kB     00:00    
beaker-ResilientStorage-debuginfo               925 kB/s |  18 kB     00:00    
beaker-SAP                                      286 kB/s | 8.0 kB     00:00    
beaker-SAP-debuginfo                            611 kB/s |  13 kB     00:00    
beaker-SAPHANA                                  441 kB/s |  12 kB     00:00    
beaker-SAPHANA-debuginfo                        668 kB/s |  13 kB     00:00    
beaker-harness                                  2.9 MB/s | 485 kB     00:00    
beaker-tasks                                     20 MB/s | 5.8 MB     00:00    
Google Cloud SDK                                 25 MB/s | 111 MB     00:04    
Total packages: 48,780   <============== THIS SYSTEM HAS MANY REPOS ENABLED
[root@kvm-01-guest11 ~]# 
[root@kvm-01-guest11 ~]# yum clean all --quiet
[root@kvm-01-guest11 ~]# 
[root@kvm-01-guest11 ~]# time subscription-manager register --username=REDACTED --password=REDACTED
Registering to: subscription.rhsm.redhat.com:443/subscription
The system has been registered with ID: c5348dc8-8dd2-425c-9d27-8828dfa1f197
The registered system name is: kvm-01-guest11.lab.eng.rdu2.redhat.com

real	0m48.890s
user	0m38.484s
sys	0m1.682s
[root@kvm-01-guest11 ~]# 

CONFIRMED: It took 48sec of real time to register this system when there are many 3rd party repos available whose repo metadata takes time to download.

Comment 6 John Sefler 2023-05-11 20:53:21 UTC
Pre-Verifying a preliminary build of subscription-manager on the same system...

[root@kvm-01-guest11 ~]# rpm -q subscription-manager
subscription-manager-1.28.37+27.g947aaa37f-1.git.0.a95e155.x86_64
[root@kvm-01-guest11 ~]# rpm -q subscription-manager --changelog | grep 2132242
- 2132242: [1.28] Outsource uploading DNF profile to rhsmcertd
[root@kvm-01-guest11 ~]# 
[root@kvm-01-guest11 ~]# yum clean all --quiet
[root@kvm-01-guest11 ~]# 
[root@kvm-01-guest11 ~]# yum repolist enabled --verbose | tail -1
beaker-AppStream                                 56 MB/s | 8.1 MB     00:00    
beaker-AppStream-debuginfo                       52 MB/s | 6.0 MB     00:00    
beaker-BaseOS                                    43 MB/s | 2.4 MB     00:00    
beaker-BaseOS-debuginfo                          34 MB/s | 1.8 MB     00:00    
beaker-CRB                                       36 MB/s | 2.3 MB     00:00    
beaker-CRB-debuginfo                             13 MB/s | 528 kB     00:00    
beaker-HighAvailability                          15 MB/s | 600 kB     00:00    
beaker-HighAvailability-debuginfo               735 kB/s |  18 kB     00:00    
beaker-NFV                                       19 MB/s | 886 kB     00:00    
beaker-NFV-debuginfo                            9.5 MB/s | 329 kB     00:00    
beaker-RT                                        20 MB/s | 884 kB     00:00    
beaker-RT-debuginfo                              11 MB/s | 329 kB     00:00    
beaker-ResilientStorage                          16 MB/s | 603 kB     00:00    
beaker-ResilientStorage-debuginfo               697 kB/s |  18 kB     00:00    
beaker-SAP                                      267 kB/s | 8.0 kB     00:00    
beaker-SAP-debuginfo                            531 kB/s |  13 kB     00:00    
beaker-SAPHANA                                  508 kB/s |  12 kB     00:00    
beaker-SAPHANA-debuginfo                        485 kB/s |  13 kB     00:00    
beaker-harness                                  2.8 MB/s | 485 kB     00:00    
beaker-tasks                                     20 MB/s | 5.8 MB     00:00    
Google Cloud SDK                                 27 MB/s | 111 MB     00:04    
Total packages: 48,780   <============= SAME SYSTEM WITH MANY REPOS ENABLED
[root@kvm-01-guest11 ~]# 
[root@kvm-01-guest11 ~]# yum clean all --quiet
[root@kvm-01-guest11 ~]# 
[root@kvm-01-guest11 ~]# time subscription-manager register --username=REDACTED --password=REDACTED
Registering to: subscription.rhsm.redhat.com:443/subscription
The system has been registered with ID: c68136e7-29c9-4186-854a-e61c76d264a1
The registered system name is: kvm-01-guest11.lab.eng.rdu2.redhat.com

real	0m3.949s
user	0m0.644s
sys	0m0.187s
[root@kvm-01-guest11 ~]# 

PRE-VERIFIED: The same registration took 3.9sec of real time versus 48sec in comment 5.  This is a significant improvement.

Comment 7 John Sefler 2023-05-11 20:59:44 UTC
The reason for the performance improvement is indicated in the logs...

[root@kvm-01-guest11 ~]# grep "Sending" /var/log/rhsm/rhsm.log 
2023-05-11 16:50:40,943 [DEBUG] subscription-manager:445110:MainThread @managercli.py:1940 - Sending SIGUSR1 signal to rhsmcertd process

[root@kvm-01-guest11 ~]# tail /var/log/rhsm/rhsmcertd.log
Thu May 11 16:50:40 2023 [DEBUG] Received SIGUSR1 signal
Thu May 11 16:50:40 2023 [DEBUG] Spawning new process of uploading package profile...
Thu May 11 16:51:25 2023 [DEBUG] Spawning of uploading package profile finished: 1
Thu May 11 16:51:25 2023 [DEBUG] stdout of uploading package profile: Package profile updates
        status: 1
        updates: []
        exceptions: 
        

Thu May 11 16:51:25 2023 [INFO] Uploading of package profile performed successfully

NOTICE: It took 45sec for "Spawning new process of uploading package profile..." to finish.

Comment 12 John Sefler 2023-05-30 14:39:48 UTC
Moving to VERIFIED based on automated testrun results in comment #11

Comment 14 errata-xmlrpc 2023-11-14 15:47: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 (subscription-manager bug fix and enhancement 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-2023:7092


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