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 2131789 - 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 9
Classification: Red Hat
Component: subscription-manager
Version: 9.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 9.2
Assignee: Jiri Hnidek
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks: 2132242
TreeView+ depends on / blocked
 
Reported: 2022-10-03 16:03 UTC by Jiri Hnidek
Modified: 2023-05-15 16:48 UTC (History)
4 users (show)

Fixed In Version: subscription-manager-1.29.32-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2132242 (view as bug list)
Environment:
Last Closed: 2023-05-09 08:18:42 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 3139 0 None Merged 2131789: Outsource uploading DNF profile to rhsmcertd 2022-12-01 16:15:41 UTC
Red Hat Issue Tracker ENT-5436 0 None None None 2022-10-05 08:32:59 UTC
Red Hat Issue Tracker RHELPLAN-135586 0 None None None 2022-10-03 16:26:53 UTC
Red Hat Product Errata RHBA-2023:2493 0 None None None 2023-05-09 08:19:03 UTC

Description Jiri Hnidek 2022-10-03 16:03:24 UTC
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 1 Craig Donnelly 2022-12-01 17:11:02 UTC
>> Pre-verification against QE builds ( subscription-manager-1.29.31+48.g4cdc769cd-1.git.0.20cba4e ) using compose 9.2-20221129.2:

[root@dhcp-13-226-244 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 4.2.10-1
subscription management rules: 5.43
subscription-manager: 1.29.31-1.el9

[root@dhcp-13-226-244 ~]# time subscription-manager register --username xx --password xx
Registering to: subscription.rhsm.redhat.com:443/subscription
The system has been registered with ID: 24f366a1-b6d1-4b3d-ae49-a10f67bb40c0
The registered system name is: test.example.com
                                     
real	0m57.839s
user	0m48.149s
sys	0m3.414s
[root@dhcp-13-226-244 ~]# dnf update subscription-manager
Updating Subscription Management repositories.
                        
This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.

Last metadata expiration check: 0:00:24 ago on Thu Dec  1 11:47:08 2022.
Dependencies resolved.
=====================================================================================================================
 Package                                Arch       Version                                    Repository        Size
=====================================================================================================================
Upgrading:
 libdnf-plugin-subscription-manager     x86_64     1.29.31+48.g4cdc769cd-1.git.0.20cba4e      rhsm_RHEL9.2      82 k
 python3-cloud-what                     x86_64     1.29.31+48.g4cdc769cd-1.git.0.20cba4e      rhsm_RHEL9.2      93 k
 python3-subscription-manager-rhsm      x86_64     1.29.31+48.g4cdc769cd-1.git.0.20cba4e      rhsm_RHEL9.2     178 k
 subscription-manager                   x86_64     1.29.31+48.g4cdc769cd-1.git.0.20cba4e      rhsm_RHEL9.2     779 k

Transaction Summary
=====================================================================================================================
Upgrade  4 Packages

Total download size: 1.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): libdnf-plugin-subscription-manager-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_ 343 kB/s |  82 kB     00:00    
(2/4): python3-subscription-manager-rhsm-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_6 609 kB/s | 178 kB     00:00    
(3/4): python3-cloud-what-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64.rpm           251 kB/s |  93 kB     00:00    
(4/4): subscription-manager-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64.rpm         3.0 MB/s | 779 kB     00:00    
---------------------------------------------------------------------------------------------------------------------
Total                                                                                2.2 MB/s | 1.1 MB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                             1/1 
  Upgrading        : python3-cloud-what-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64                             1/8 
  Upgrading        : python3-subscription-manager-rhsm-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64              2/8 
  Upgrading        : libdnf-plugin-subscription-manager-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64             3/8 
  Running scriptlet: subscription-manager-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64                           4/8 
  Upgrading        : subscription-manager-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64                           4/8 
  Running scriptlet: subscription-manager-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64                           4/8 
  Running scriptlet: subscription-manager-1.29.31-1.el9.x86_64                                                   5/8 
  Cleanup          : subscription-manager-1.29.31-1.el9.x86_64                                                   5/8 
  Running scriptlet: subscription-manager-1.29.31-1.el9.x86_64                                                   5/8 
  Cleanup          : python3-subscription-manager-rhsm-1.29.31-1.el9.x86_64                                      6/8 
  Cleanup          : python3-cloud-what-1.29.31-1.el9.x86_64                                                     7/8 
  Cleanup          : libdnf-plugin-subscription-manager-1.29.31-1.el9.x86_64                                     8/8 
  Running scriptlet: subscription-manager-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64                           8/8 
  Running scriptlet: libdnf-plugin-subscription-manager-1.29.31-1.el9.x86_64                                     8/8 
  Verifying        : libdnf-plugin-subscription-manager-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64             1/8 
  Verifying        : libdnf-plugin-subscription-manager-1.29.31-1.el9.x86_64                                     2/8 
  Verifying        : python3-cloud-what-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64                             3/8 
  Verifying        : python3-cloud-what-1.29.31-1.el9.x86_64                                                     4/8 
  Verifying        : python3-subscription-manager-rhsm-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64              5/8 
  Verifying        : python3-subscription-manager-rhsm-1.29.31-1.el9.x86_64                                      6/8 
  Verifying        : subscription-manager-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64                           7/8 
  Verifying        : subscription-manager-1.29.31-1.el9.x86_64                                                   8/8 
Installed products updated.

Upgraded:
  libdnf-plugin-subscription-manager-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64                                    
  python3-cloud-what-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64                                                    
  python3-subscription-manager-rhsm-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64                                     
  subscription-manager-1.29.31+48.g4cdc769cd-1.git.0.20cba4e.x86_64                                                  

Complete!
[root@dhcp-13-226-244 ~]# subscription-manager unregister
Unregistering from: subscription.rhsm.redhat.com:443/subscription
System has been unregistered.
[root@dhcp-13-226-244 ~]# dnf clean all
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.

11 files removed
[root@dhcp-13-226-244 ~]# time subscription-manager register --username xx --password xx
Registering to: subscription.rhsm.redhat.com:443/subscription
The system has been registered with ID: 2ba676c4-7520-47bd-b6ec-fb6fba2a3e07
The registered system name is: test.example.com

real	0m4.499s
user	0m0.824s
sys	0m0.328s

>> 4.5s vs 57s registration.
>> LGTM, pre-verified.

Comment 10 John Sefler 2023-01-24 17:07:25 UTC
Effectively the fix for this bug was a performance improvement.  Instead of blocking the registration task to wait for "dnf uploadprofile" to complete, the task is now spawned off to the rhsmcertd-worker to complete in parallel.  Hence the registration task completes much faster.

The performance improvement is demonstrated in comment 1 and passes automated tests in comment 6 and comment 9.
The fixed package subscription-manager-1.29.32-1.el9 has landed in RHEL compose RHEL-9.2.0-20230117.13

Moving to VERIFIED

Comment 12 errata-xmlrpc 2023-05-09 08:18:42 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:2493


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