Bug 1613456
Summary: | [RHEL76] It takes two invocations of "dnf-plugin-subscription-manager" to populate the redhat.repo file | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Rehana <redakkan> |
Component: | subscription-manager | Assignee: | candlepin-bugs |
Status: | CLOSED ERRATA | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 7.6 | CC: | csnyder, jsefler, khowell |
Target Milestone: | rc | Keywords: | EasyFix, Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-10-30 10:37:37 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1558411, 1615433 |
Description
Rehana
2018-08-07 15:19:14 UTC
@dev All we should need is a cherry pick of a3bd8ae27acd287c83c811a2e18da79629946bb0 Correction the commit hash is: 4cee072dddd2df09b1d4076e978cba8cea2b2154 The fix has been cherry-picked for the next build. Moving to POST. Reproducer : =========== # rpm -qa subsc* dnf* | sort dnf-2.7.5-17.el7.noarch dnf-data-2.7.5-17.el7.noarch dnf-plugins-core-2.1.5-5.el7.noarch dnf-plugin-subscription-manager-1.21.5-7.el7.x86_64 subscription-manager-1.21.5-7.el7.x86_64 subscription-manager-rhsm-1.21.5-7.el7.x86_64 subscription-manager-rhsm-certificates-1.21.5-7.el7.x86_64 1.Disable all yum plugins #subscription-manager config --list | grep auto_enable auto_enable_yum_plugins = 0 # cat /etc/yum/pluginconf.d/search-disabled-repos.conf | grep enabled enabled=0 # Repositories matching the patterns listed in ignored_repos will not be enabled by the plugin # cat /etc/yum/pluginconf.d/subscription-manager.conf | grep enabled enabled=0 # cat /etc/yum/pluginconf.d/product-id.conf | grep enabled enabled=0 2. Register and attach subscription # subscription-manager register --auto-attach Registering to: subscription.rhsm.stage.redhat.com:443/subscription Username: stage_test_rhel74 Password: The system has been registered with ID: a2e95a09-359a-4b2b-a854-f656da1c9106 The registered system name is: ibm-x3650m4-01-vm-14.lab.eng.bos.redhat.com Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed 3.Delete the redhat.repo populated # rm -rf /etc/yum.repos.d/redhat.repo 4.Execute dnf repolist # dnf repolist -d3 Loaded plugins: builddep, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, needs-restarting, playground, repoclosure, repograph, repomanage, reposync DNF version: 2.7.5 cachedir: /var/cache/dnf No repositories available 5. Add a workaround to load the plugins. #echo 'pluginpath=/usr/lib64/python2.7/site-packages/dnf-plugins,/usr/lib/python2.7/site-packages/dnf-plugins' >> /etc/dnf/dnf.conf 6. # dnf repolist -d3 Loaded plugins: builddep, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, needs-restarting, playground, product-id, repoclosure, repograph, repomanage, reposync, subscription-manager DNF version: 2.7.5 cachedir: /var/cache/dnf Updating Subscription Management repositories. No repositories available NO repositories were loaded Try again # dnf repolist -d3 Loaded plugins: builddep, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, needs-restarting, playground, product-id, repoclosure, repograph, repomanage, reposync, subscription-manager DNF version: 2.7.5 cachedir: /var/cache/dnf Updating Subscription Management repositories. Last metadata expiration check: 0:00:30 ago on Monday 20 August 2018 06:13:13 AM EDT. repo id repo name status rhel-7-server-rpms Red Hat Enterprise Linux 7 Server (RPMs) 20,891 On the second attempt the repositories were listed. Verifying on : =============== # rpm -qa subsc* dnf* | sort dnf-2.7.5-17.el7.noarch dnf-data-2.7.5-17.el7.noarch dnf-plugins-core-2.1.5-5.el7.noarch dnf-plugin-subscription-manager-1.21.7-1.el7.x86_64 subscription-manager-1.21.7-1.el7.x86_64 subscription-manager-rhsm-1.21.7-1.el7.x86_64 subscription-manager-rhsm-certificates-1.21.7-1.el7.x86_64 Note:Install dnf-plugin-subscription manager and its dependencies from Extras repo. 1. Make sure all the yum plugin are disabled on the system # subscription-manager config --list | grep auto_enable auto_enable_yum_plugins = 0 # cat /etc/yum/pluginconf.d/search-disabled-repos.conf | grep enabled enabled=0 # Repositories matching the patterns listed in ignored_repos will not be enabled by the plugin # cat /etc/yum/pluginconf.d/subscription-manager.conf | grep enabled enabled=0 # cat /etc/yum/pluginconf.d/product-id.conf | grep enabled enabled=0 2. Register and attach subscription # subscription-manager register --auto-attach Registering to: subscription.rhsm.stage.redhat.com:443/subscription Username: stage_test_rhel74 Password: The system has been registered with ID: 2dd800bd-4346-4cff-83d4-9714618696b6 The registered system name is: cisco-b22m3-01.rhts.eng.bos.redhat.com Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed 3.Remove the redhat.repo file from the system # rm -rf redhat.repo 4.Execute dnf repolist -d3 ( note : Now that Bug 1613454 is fixed and verified, user need NOT to add the plugin path into dnf.conf file manually ) # dnf repolist -d3 Loaded plugins: builddep, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, needs-restarting, playground, product-id, repoclosure, repograph, repomanage, reposync, subscription-manager Updating Subscription Management repositories. DNF version: 2.7.5 cachedir: /var/cache/dnf Updating Subscription Management repositories. Last metadata expiration check: 0:39:59 ago on Monday 20 August 2018 05:38:04 AM EDT. repo id repo name status rhel-7-server-rpms Red Hat Enterprise Linux 7 Server (RPMs) 20,891 Plugins are now loaded and repos are listed successfully in the first attempt itself. Based on the above observations marking the bug as Verified. 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, 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-2018:3153 |