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 1466453 - [RFE] rhn-migrate-classic-to-rhsm should ensure subscription-manager yum plugin is enabled
Summary: [RFE] rhn-migrate-classic-to-rhsm should ensure subscription-manager yum plug...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: John Sefler
Filip Hanzelka
URL:
Whiteboard:
Depends On: 1516832
Blocks: 1420851 1469152
TreeView+ depends on / blocked
 
Reported: 2017-06-29 16:15 UTC by Mason Loring Bliss
Modified: 2021-09-09 12:23 UTC (History)
11 users (show)

Fixed In Version: subscription-manager-1.20.2-1
Doc Type: Release Note
Doc Text:
*rhn-migrate-classic-to-rhsm* now automatically enables the `subscription-manager` and `product-id` yum plugins With this update, the *rhn-migrate-classic-to-rhsm* utility automatically enables the `yum` plugins: `subscription-manager` and `product-id`. With this update, the *subscription-manager* utility automatically enables the `yum` plugins: `subscription-manager` and `product-id`. This update benefits users of Red Hat Enterprise Linux who previously used the *rhn-client-tools* utility to register their systems to Red Hat Network Classic or who still use it with Satellite 5 entitlement servers, and who have temporarily disabled the `yum` plugins. As a result, *rhn-migrate-classic-to-rhsm* allows an easy transition to using the newer *subscription-manager* tools for entitlements. Note that running *rhn-migrate-classic-to-rhsm* displays a warning message indicating how to change this default behavior if it is not desirable.
Clone Of:
Environment:
Last Closed: 2018-04-10 09:49:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github /candlepin subscription-manager pull 1702 0 None None None 2017-09-20 08:01:33 UTC
Red Hat Bugzilla 1319927 0 medium CLOSED [RFE] subscription-manager should automatically enable yum plugins 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2018:0681 0 None None None 2018-04-10 09:50:47 UTC

Internal Links: 1319927

Description Mason Loring Bliss 2017-06-29 16:15:23 UTC
Description of problem:


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

Presumably all versions.


How reproducible:


Steps to Reproduce:
1. Register a system with RHN.
2. Install subscription manager, disable /etc/yum/pluginconf.d/subscription-manager.conf
3. Run rhn-migrate-classic-to-rhsm

Actual results:

/etc/yum/pluginconf.d/subscription-manager.conf left disabled

Expected results:

/etc/yum/pluginconf.d/subscription-manager.conf enabled

Additional info:

Unclear how the setting was disabled, but SFDC case 01865488 saw my customer encounter this.

Comment 10 Rehana 2017-11-13 11:56:01 UTC
Reproducing the failure on RHEL74:
====================================

version:
subscription management server: 2.0.43-1
subscription management rules: 5.26
subscription-manager: 1.19.21-1.el7
python-rhsm: 1.19.9-1.el7

1)REgister system with RHN 

#  rhnreg_ks --serverUrl=https://rhsm-sat5.usersys.redhat.com/XMLRPC --username=rhsm-client --password=**** --profilename=rhsmtest --force  --nohardware --nopackages --novirtinfo

2)Disabled the subscription-manager and product-id plugins 

#sed -i s/^enabled=1/enabled=0/ /etc/yum/pluginconf.d/subscription-manager.conf

#sed -i s/^enabled=1/enabled=0/ /etc/yum/pluginconf.d/product-id.conf

Verifying the same is set to "0"

#egrep ^enabled /etc/yum/pluginconf.d/product-id.conf
enabled=0
# egrep ^enabled /etc/yum/pluginconf.d/subscription-manager.conf
enabled=0

3) Now migrate the system to RHSM


[root@dhcp35-85 ~]#  rhn-migrate-classic-to-rhsm --legacy-user=rhsm-client --legacy-password=*** --destination-url=subscription.rhsm.stage.redhat.com:443/subscription --destination-user=qa --destination-password=***

Retrieving existing legacy subscription information...

+-----------------------------------------------------+
System is currently subscribed to these legacy channels:
+-----------------------------------------------------+
rhel-x86_64-server-7

+-----------------------------------------------------+
Installing product certificates for these legacy channels:
+-----------------------------------------------------+
rhel-x86_64-server-7

Product certificates installed successfully to /etc/pki/product.

Preparing to unregister system from legacy server...
System successfully unregistered from legacy server.
Stopping and disabling legacy services...
rhnsd.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig rhnsd off

Attempting to register system to destination server...
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
The system has been registered with ID: 6f0add1f-9fa5-4de9-af68-d61204fad2e7 

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

System 'dhcp35-85.lab.eng.blr.redhat.com' successfully registered.

Verify if the plugins are enabled.

# egrep ^enabled /etc/yum/pluginconf.d/subscription-manager.conf
enabled=0
# egrep ^enabled /etc/yum/pluginconf.d/product-id.conf
enabled=0
[root@dhcp35-85 pluginconf.d]# 

Observed that the "subscription-manager" and product-id plugins were not enabled
also see the yum repolist didn't load those plugins 

[root@dhcp35-85 ~]# yum repolist
Loaded plugins: langpacks, search-disabled-repos
repo id        repo name                    status
!rhel-7-server-rpms/7Server/x86_64                                                                 Red Hat Enterprise Linux 7 Server (RPMs)                                                                  17,474
repolist: 17,474

Comment 11 Rehana 2017-11-27 13:31:33 UTC
Verification is blocked until bug 1516832 is fixed

Comment 12 Shwetha Kallesh 2017-12-11 08:57:22 UTC
Moving bug to verified as yum plugin is enabled when migrated from rhn to rhsm

[root@dhcp35-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.0.43-1
subscription management rules: 5.26
subscription-manager: 1.20.7-1.el7


[root@dhcp35-7 ~]# rhnreg_ks --serverUrl=https://rhsm-sat5.usersys.redhat.com/XMLRPC --username=**** --password=**** --profilename=rhsmtest --force  --nohardware --nopackages --novirtinfo
[root@dhcp35-7 ~]# subscription-manager identity
server type: RHN Classic

WARNING

The yum plugins: /etc/yum/pluginconf.d/subscription-manager.conf, /etc/yum/pluginconf.d/product-id.conf were automatically enabled for the benefit of Red Hat Subscription Management. If not desired, use "subscription-manager config --rhsm.auto_enable_yum_plugins=0" to block this behavior.

[root@dhcp35-7 ~]# sed -i s/^enabled=1/enabled=0/ /etc/yum/pluginconf.d/subscription-manager.conf
[root@dhcp35-7 ~]# sed -i s/^enabled=1/enabled=0/ /etc/yum/pluginconf.d/product-id.conf
[root@dhcp35-7 ~]# 
[root@dhcp35-7 ~]# egrep ^enabled /etc/yum/pluginconf.d/product-id.conf
enabled=0
[root@dhcp35-7 ~]# egrep ^enabled /etc/yum/pluginconf.d/subscription-manager.conf
enabled=0


[root@dhcp35-7 ~]#  rhn-migrate-classic-to-rhsm --legacy-user=**** --legacy-password=**** --destination-url=subscription.rhsm.stage.redhat.com:443/subscription --destination-user=shwetha_tier1_test --destination-password=***

Retrieving existing legacy subscription information...

+-----------------------------------------------------+
System is currently subscribed to these legacy channels:
+-----------------------------------------------------+
rhel-x86_64-server-7

+-----------------------------------------------------+
Installing product certificates for these legacy channels:
+-----------------------------------------------------+
rhel-x86_64-server-7

Product certificates installed successfully to /etc/pki/product.

Preparing to unregister system from legacy server...
System successfully unregistered from legacy server.
Stopping and disabling legacy services...
rhnsd.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig rhnsd off

Attempting to register system to destination server...
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
The system has been registered with ID: 1ca2a68e-0c84-4173-8c0f-4b1cfe31053d
The registered system name is: dhcp35-7.lab.eng.blr.redhat.com
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed


WARNING

The yum plugins: /etc/yum/pluginconf.d/subscription-manager.conf, /etc/yum/pluginconf.d/product-id.conf were automatically enabled for the benefit of Red Hat Subscription Management. If not desired, use "subscription-manager config --rhsm.auto_enable_yum_plugins=0" to block this behavior.

System 'dhcp35-7.lab.eng.blr.redhat.com' successfully registered.

[root@dhcp35-7 ~]# egrep ^enabled /etc/yum/pluginconf.d/product-id.conf
enabled=1

[root@dhcp35-7 ~]# egrep ^enabled /etc/yum/pluginconf.d/subscription-manager.conf
enabled=1

Comment 17 errata-xmlrpc 2018-04-10 09:49:52 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, 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:0681


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