Bug 1017866 - attaching a subscription should not update redhat.repo when yum plugin is disabled
attaching a subscription should not update redhat.repo when yum plugin is dis...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.5
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: candlepin-bugs
John Sefler
: Regression
Depends On:
Blocks: rhsm-rhel65
  Show dependency treegraph
 
Reported: 2013-10-10 12:06 EDT by John Sefler
Modified: 2013-10-10 18:06 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-10 18:06:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sefler 2013-10-10 12:06:06 EDT
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 18:06:50 EDT
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.