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 1017866 - attaching a subscription should not update redhat.repo when yum plugin is disabled
Summary: attaching a subscription should not update redhat.repo when yum plugin is dis...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel65
TreeView+ depends on / blocked
 
Reported: 2013-10-10 16:06 UTC by John Sefler
Modified: 2013-10-10 22:06 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-10 22:06:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2013-10-10 16:06:06 UTC
Description of problem:
I suspect that newly implemented RFE bug 1008016 introduced this regression.
When the /etc/yum/pluginconf.d/subscription-manager.conf is disabled, there should not be any updates made to /etc/yum.repos.d/redhat.repo as subscriptions are attached/removed.


Version-Release number of selected component (if applicable):
[root@jsefler-6 ~]# rpm -q --whatprovides /etc/yum/pluginconf.d/subscription-manager.conf
subscription-manager-1.9.9-1.el6.x86_64


How reproducible:


Steps to Reproduce:
1. register and unsubscribe all (should not have any entitlements)

2. [root@jsefler-6 ~]# cat /etc/yum.repos.d/redhat.repo 
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# If this file is empty and this system is subscribed consider 
# a "yum repolist" to refresh available repos
#

^^^ Notice the redhat.repo has no repos defined when no subscriptions have been attached.  This is expected.

3. Edit /etc/yum/pluginconf.d/subscription-manager.conf and set enabled=0
[root@jsefler-6 ~]# cat /etc/yum/pluginconf.d/subscription-manager.conf
[main]
enabled=0

4. Attach a subscription that provides content.
[root@jsefler-6 ~]# subscription-manager attach --pool 8a9087404175311a01417531f1051428
Successfully attached a subscription for: Awesome OS Server Basic

5. [root@jsefler-6 ~]# cat /etc/yum.repos.d/redhat.repo 
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# If this file is empty and this system is subscribed consider 
# a "yum repolist" to refresh available repos
#

[content-label-empty-gpg]
name = content-emptygpg
baseurl = https://cdn.redhat.com/foo/path
enabled = 0
gpgcheck = 0
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/5617235906887313917-key.pem
sslclientcert = /etc/pki/entitlement/5617235906887313917.pem

[content-label]
name = content
baseurl = https://cdn.redhat.com/foo/path
enabled = 0
gpgcheck = 1
gpgkey = https://cdn.redhat.com/foo/path/gpg/
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/5617235906887313917-key.pem
sslclientcert = /etc/pki/entitlement/5617235906887313917.pem

^^^ FAILED: No content repos should have been added to redhat.repo when /etc/yum/pluginconf.d/subscription-manager.conf is disabled.

Comment 1 John Sefler 2013-10-10 22:06:50 UTC
Closing this bug / working as designed.

There are actually two configurations that are easy to confuse.

1.
/etc/yum/pluginconf.d/subscription-manager.conf controls the enablement of the subscription-manager yum plugin.

2.
/etc/rhsm/rhsm.conf contains an rhsm manage_repos configuration that will set the enablement for managing yum repos in /etc/yum.repos.d/redhat.repo that originate from attached entitlement subscriptions.

Hence the reason for the perceived behavior failure in comment 0 was because the rhsm manage_repos configuration in /etc/rhsm/rhsm.conf was enabled.


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