Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1501889

Summary: Even when --rhsm.auto_enable_yum_plugins=0 is set in rhsm.conf file yum plugins are automatically enabled after you execute RHSM commands
Product: Red Hat Enterprise Linux 7 Reporter: Shwetha Kallesh <skallesh>
Component: subscription-managerAssignee: Jiri Hnidek <jhnidek>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: medium Docs Contact:
Priority: high    
Version: 7.5CC: jhnidek, khowell, redakkan, skallesh
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 09:52:05 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:

Description Shwetha Kallesh 2017-10-13 12:25:10 UTC
Description of problem:
Even when --rhsm.auto_enable_yum_plugins=0 is set in rhsm.conf file yum plugins are automatically enabled after you execute RHSM commands 

Version-Release number of selected component (if applicable):
[root@hp-dl160g8-1 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 2.2.0-1
subscription management rules: 5.26
subscription-manager: 1.20.2-1.el7
python-rhsm: 1.20.2-1.el7


How reproducible:


Steps to Reproduce:

Disable the subscription-manager yum plugin and verify:

[root@hp-dl160g8-1 ~]# sed -i s/enabled=./enabled=0/g /etc/yum/pluginconf.d/subscription-manager.conf

[root@hp-dl160g8-1 ~]# grep enabled /etc/yum/pluginconf.d/subscription-manager.conf
enabled=0


Turn off the auto_enable_yum_plugins=0 configuration and verify

[root@hp-dl160g8-1 ~]# subscription-manager config --rhsm.auto_enable_yum_plugins=0
WARNING

The yum plugins: /etc/yum/pluginconf.d/subscription-manager.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-dl160g8-1 ~]# cat /etc/rhsm/rhsm.conf | grep auto_enable_yum_plugins
auto_enable_yum_plugins = 0

Run any sub-man cmd :

[root@hp-dl160g8-1 ~]# subscription-manager clean
All local data removed

Now very if yum plugin remains disabled:

[root@hp-dl160g8-1 ~]# grep enabled /etc/yum/pluginconf.d/subscription-manager.conf
enabled=1


Actual results:
enabled=1

Expected results:
enabled=0

Additional info:

Comment 2 John Sefler 2017-10-13 17:45:37 UTC
This is ironically funny...  subscription-manager config is automatically enabling the disabled yum plugins while in the process of turning off the rhsm.auto_enable_yum_plugins configuration in rhsm.conf to prevent subscription-manager from automatically enabling the yum plugins.

Comment 3 Kevin Howell 2017-10-16 14:07:55 UTC
Let's special-case the config subcommand so that comment 2 doesn't happen.

Comment 5 Shwetha Kallesh 2017-11-07 11:01:14 UTC
Verified

[root@hp-ms-01-c02 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.2.0-1
subscription management rules: 5.26
subscription-manager: 1.20.5-1.el7


Disable the subscription-manager yum plugin and verify:

[root@hp-ms-01-c02 ~]#  sed -i s/enabled=./enabled=0/g /etc/yum/pluginconf.d/subscription-manager.conf
[root@hp-ms-01-c02 ~]# grep enabled /etc/yum/pluginconf.d/subscription-manager.conf
enabled=0

Turn off the auto_enable_yum_plugins=0 configuration and verify

[root@hp-ms-01-c02 ~]# subscription-manager config --rhsm.auto_enable_yum_plugins=0


[root@hp-ms-01-c02 ~]# cat /etc/rhsm/rhsm.conf | grep auto_enable_yum_plugins
auto_enable_yum_plugins = 0

Run sub-man command:

[root@hp-ms-01-c02 ~]# subscription-manager clean
All local data removed

Now very if yum plugin remains disabled:

[root@hp-ms-01-c02 ~]# grep enabled /etc/yum/pluginconf.d/subscription-manager.conf
enabled=0

Comment 8 errata-xmlrpc 2018-04-10 09:52:05 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