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 1623262 - yum plugins "product-id" and "subscription-manager" are not getting automatically enabled
Summary: yum plugins "product-id" and "subscription-manager" are not getting automatic...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.6
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-28 20:44 UTC by John Sefler
Modified: 2018-10-30 10:38 UTC (History)
6 users (show)

Fixed In Version: subscription-manager-1.21.10-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:37:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1910 0 None closed 1623262: Make automatic enablement of yum plugins working again; ENT-820 2021-01-07 16:06:44 UTC
Red Hat Product Errata RHBA-2018:3153 0 None None None 2018-10-30 10:38:05 UTC

Description John Sefler 2018-08-28 20:44:52 UTC
Description of problem:

Originally introduced by RFE Bug 1319927, if the following two plugin configuration files are disabled....

/etc/yum/pluginconf.d/subscription-manager.conf
/etc/yum/pluginconf.d/product-id.conf

...and you have set the following in /etc/rhsm/rhsm.conf
# Manage automatic enabling of yum plugins (product-id, subscription-manager)
auto_enable_yum_plugins = 1

...then a command line call to a subscription-manager module will automatically enable the yum plugins and produce the following output...

WARNING

The yum plugins: /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.


I suspect the work done to introduce dnf-plugin-subscription-manager RFE Bug 1558411 as an extras package for RHEL76 has introduced a regression with the yum plugins.


Version-Release number of selected component (if applicable):
[root@ibm-ls22-01 ~]# rpm -q subscription-manager
subscription-manager-1.21.7-1.el7.x86_64


How reproducible:


Steps to Reproduce:
In a terminal window, enable auto_enable_yum_plugins and disable the yum plugins...
[root@ibm-ls22-01 ~]# subscription-manager config --logging.default_log_level=DEBUG
[root@ibm-ls22-01 ~]# subscription-manager config --rhsm.auto_enable_yum_plugins=1
[root@ibm-ls22-01 ~]# sed -i s/1/0/g /etc/yum/pluginconf.d/product-id.conf
[root@ibm-ls22-01 ~]# sed -i s/1/0/g /etc/yum/pluginconf.d/subscription-manager.conf 

In a second terminal window, start tailing the rhsm.log for "repolib"
[root@ibm-ls22-01 ~]# tail -f /var/log/rhsm/rhsm.log | grep repolib

In the first terminal window, register to any server
[root@ibm-ls22-01 ~]# subscription-manager register --serverurl=subscription.rhsm.stage.redhat.com:443/subscription
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: stage_auto_testuser
Password: 
The system has been registered with ID: a79e4a47-15dd-4d3b-b5db-4434eab8086f
The registered system name is: ibm-ls22-01.mpc.lab.eng.bos.redhat.com

In the second terminal window, notice...
2018-08-28 16:28:16,286 [DEBUG] subscription-manager:13599:MainThread @repolib.py:129 - The rhsm.auto_enable_yum_plugins is enabled
2018-08-28 16:28:16,287 [DEBUG] subscription-manager:13599:MainThread @repolib.py:184 - Yum plugin: "/etc/dnf/plugins/subscription-manager.conf" already enabled. Nothing to do.
2018-08-28 16:28:16,287 [DEBUG] subscription-manager:13599:MainThread @repolib.py:184 - Yum plugin: "/etc/dnf/plugins/product-id.conf" already enabled. Nothing to do.


Actual results:
  above


Expected results:
1. Expected the output from the register command to report this warning...

WARNING

The yum plugins: /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.

2. Expected the tailing rhsm.log to report on "/etc/yum/plugins/"; not "/etc/dnf/plugins/".




Additional info:

This bug can be fixed with the following one line change from...

[root@ibm-ls22-01 ~]# grep use_dnf /usr/lib64/python2.7/site-packages/subscription_manager/repolib.py
        if version.use_dnf:

to...
[root@ibm-ls22-01 ~]# grep use_dnf /usr/lib64/python2.7/site-packages/subscription_manager/repolib.py
        if version.use_dnf=="true":

Comment 8 Shwetha Kallesh 2018-09-10 14:00:36 UTC
Verification:

[root@hp-dl360egen8-01 ~]# subscription-manager  version
server type: Red Hat Subscription Management
subscription management server: 2.3.9-1
subscription management rules: 5.26
subscription-manager: 1.21.10-2.el7

[root@hp-dl360egen8-01 ~]# subscription-manager config --logging.default_log_level=DEBUG
[root@hp-dl360egen8-01 ~]# subscription-manager config --rhsm.auto_enable_yum_plugins=1
[root@hp-dl360egen8-01 ~]# sed -i s/1/0/g /etc/yum/pluginconf.d/product-id.conf
[root@hp-dl360egen8-01 ~]# sed -i s/1/0/g /etc/yum/pluginconf.d/subscription-manager.conf 
[root@hp-dl360egen8-01 ~]# grep enabled /etc/yum/pluginconf.d/subscription-manager.conf
enabled=0
[root@hp-dl360egen8-01 ~]# grep enabled /etc/yum/pluginconf.d/product-id.conf 
enabled=0
[root@hp-dl360egen8-01 ~]# subscription-manager register --serverurl=subscription.rhsm.stage.redhat.com:443/subscription
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: shwetha_tier1_test
Password: 
The system has been registered with ID: 9dc30c2a-88d0-4a16-85f0-7dc7d422652a
The registered system name is: hp-dl360egen8-01.khw.lab.eng.bos.redhat.com

WARNING

The yum/dnf 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@hp-dl360egen8-01 ~]# grep enabled /etc/yum/pluginconf.d/product-id.conf 
enabled=1
[root@hp-dl360egen8-01 ~]# grep enabled /etc/yum/pluginconf.d/subscription-manager.conf
enabled=1


2018-09-10 09:59:18,847 [DEBUG] subscription-manager:17248:MainThread @connection.py:888 - Server supports the following resources: {u'': u'/', u'guestids': u'/consumers/{consumer_uuid}/guestids', u'cdn': u'/cdn', u'content_overrides': u'/consumers/{consumer_uuid}/content_overrides', u'hypervisors': u'/hypervisors', u'serials': u'/serials', u'deleted_consumers': u'/deleted_consumers', u'consumers': u'/consumers', u'migrations': u'/migrations', u'content': u'/content', u'entitlements': u'/entitlements', u'events': u'/events', u'status': u'/status', u'jobs': u'/jobs', u'users': u'/users', u'subscriptions': u'/subscriptions', u'rules': u'/rules', u'distributor_versions': u'/distributor_versions', u'consumertypes': u'/consumertypes', u'statistics/generate': u'/statistics/generate', u'pools': u'/pools', u'atom': u'/atom', u'packages': u'/consumers/{consumer_uuid}/packages', u'owners': u'/owners', u'roles': u'/roles', u'admin': u'/admin', u'products': u'/products', u'activation_keys': u'/activation_keys', u'crl': u'/crl'}
2018-09-10 09:59:18,849 [DEBUG] subscription-manager:17248:MainThread @connection.py:497 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem
2018-09-10 09:59:18,849 [DEBUG] subscription-manager:17248:MainThread @connection.py:545 - Making request: GET /subscription/status
2018-09-10 09:59:19,311 [INFO] subscription-manager:17248:MainThread @connection.py:588 - Response: status=200, requestUuid=9083df5e-0d41-4554-9d3a-830f5816752e, request="GET /subscription/status"
2018-09-10 09:59:19,312 [INFO] subscription-manager:17248:MainThread @managercli.py:357 - Server Versions: {'rules-version': u'5.26', 'candlepin': u'2.3.9-1', 'server-type': u'Red Hat Subscription Management'}
2018-09-10 09:59:19,313 [DEBUG] subscription-manager:17248:MainThread @repolib.py:195 - The rhsm.auto_enable_yum_plugins is enabled
2018-09-10 09:59:19,313 [DEBUG] subscription-manager:17248:MainThread @repolib.py:171 - dnf plugin: "/etc/dnf/plugins/subscription-manager.conf" already enabled. Nothing to do.
2018-09-10 09:59:19,314 [DEBUG] subscription-manager:17248:MainThread @repolib.py:171 - dnf plugin: "/etc/dnf/plugins/product-id.conf" already enabled. Nothing to do.
2018-09-10 09:59:19,315 [DEBUG] subscription-manager:17248:MainThread @repolib.py:171 - yum plugin: "/etc/yum/pluginconf.d/subscription-manager.conf" already enabled. Nothing to do.
2018-09-10 09:59:19,316 [DEBUG] subscription-manager:17248:MainThread @repolib.py:171 - yum plugin: "/etc/yum/pluginconf.d/product-id.conf" already enabled. Nothing to do.

Comment 10 errata-xmlrpc 2018-10-30 10:37:37 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:3153


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