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 2074111 - subscription-manager release setting is not landing in the redhat.repo file [rhel-8.7.0]
Summary: subscription-manager release setting is not landing in the redhat.repo file [...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.6
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: rc
: 8.7
Assignee: Pino Toscano
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On: 2073558
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-11 14:54 UTC by RHEL Program Management Team
Modified: 2022-11-08 12:32 UTC (History)
6 users (show)

Fixed In Version: subscription-manager-1.28.30-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2073558
Environment:
Last Closed: 2022-11-08 10:48:23 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 3030 0 None Merged [1.28] 2074111: clear the release cache on release change 2022-04-13 14:26:50 UTC
Red Hat Issue Tracker RHELPLAN-118559 0 None None None 2022-04-11 15:09:09 UTC
Red Hat Product Errata RHEA-2022:7719 0 None None None 2022-11-08 10:48:31 UTC

Comment 1 Rehana 2022-04-25 12:05:01 UTC
# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.22-1
subscription management rules: 5.41
subscription-manager: 1.28.29-1.git.22.704860e.el8

# subscription-manager register 
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: sca_rhsm_1
Password: 
The system has been registered with ID: b2b387a0-0907-4d78-a9db-03be7577dccb
The registered system name is: kvm-01-guest06.lab.eng.rdu2.redhat.com

# subscription-manager repos --list-enabled
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-8-for-x86_64-appstream-rpms
Repo Name: Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
Repo URL:  https://cdn.stage.redhat.com/content/dist/rhel8/$releasever/x86_64/appstream/os
Enabled:   1

Repo ID:   rhel-8-for-x86_64-baseos-rpms
Repo Name: Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
Repo URL:  https://cdn.stage.redhat.com/content/dist/rhel8/$releasever/x86_64/baseos/os
Enabled:   1

# subscription-manager release --list
+-------------------------------------------+
          Available Releases
+-------------------------------------------+
8
8.0
8.1
8.2
8.3
8.4
8.5
8.6
8.7

# subscription-manager release --set=8.6
Release set to: 8.6

# subscription-manager repos --list-enabled
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-8-for-x86_64-appstream-rpms
Repo Name: Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
Repo URL:  https://cdn.stage.redhat.com/content/dist/rhel8/8.6/x86_64/appstream/os
Enabled:   1

Repo ID:   rhel-8-for-x86_64-baseos-rpms
Repo Name: Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
Repo URL:  https://cdn.stage.redhat.com/content/dist/rhel8/8.6/x86_64/baseos/os
Enabled:   1

ˆ^Notice the $releasever is the repo url was replaced by the release version set on the system. Based on the observation , pre verifying the bug

Comment 6 Rehana 2022-06-14 10:17:49 UTC
Final verification on :
======================

//In order to demonstrate the release list we need to have GA certificate on the system. Currently I m manually placing the GA certificate for the verification purpose. Also using stage environments to demo the verification steps 
# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 4.0.18-1
subscription management rules: 5.41
subscription-manager: 1.28.30-1.el8

# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: sca_rhsm_1
Password: 
The system has been registered with ID: *******
The registered system name is: *******

# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name: Red Hat Enterprise Linux for x86_64
Product ID:   479
Version:      8.7
Arch:         x86_64

# subscription-manager repos --list-enabled
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-8-for-x86_64-baseos-rpms
Repo Name: Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
Repo URL:  https://cdn.stage.redhat.com/content/dist/rhel8/$releasever/x86_64/baseos/os
Enabled:   1

Repo ID:   rhel-8-for-x86_64-appstream-rpms
Repo Name: Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
Repo URL:  https://cdn.stage.redhat.com/content/dist/rhel8/$releasever/x86_64/appstream/os
Enabled:   1

# grep '$releasever' /etc/yum.repos.d/redhat.repo | wc --lines
15

ˆ^Notice $releasever was present in the redhat.repo prior to setting release version on the system

# subscription-manager release --list
+-------------------------------------------+
          Available Releases
+-------------------------------------------+
8
8.0
8.1
8.2
8.3
8.4
8.5
8.6
8.7

# subscription-manager release --set=8.7
Release set to: 8.7

# grep '$releasever' /etc/yum.repos.d/redhat.repo | wc --lines
0

ˆAfter the release version was set on the system, all the reference to $releasever was replaced by the actual value configured on the system

# subscription-manager repos --list-enabled
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   rhel-8-for-x86_64-appstream-rpms
Repo Name: Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
Repo URL:  https://cdn.stage.redhat.com/content/dist/rhel8/8.7/x86_64/appstream/os
Enabled:   1

Repo ID:   rhel-8-for-x86_64-baseos-rpms
Repo Name: Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
Repo URL:  https://cdn.stage.redhat.com/content/dist/rhel8/8.7/x86_64/baseos/os
Enabled:   1

# cat /var/lib/rhsm/cache/releasever.json
{"releaseVer": "8.7"}

Based on the observations now the user can successfully set release version on the system. Hence verifying the bug.

Comment 8 errata-xmlrpc 2022-11-08 10:48:23 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/RHEA-2022:7719


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