Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 591508 - disabled sm yum plugin displays repo for subscribed product
Summary: disabled sm yum plugin displays repo for subscribed product
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.1
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Jeff Ortel
QA Contact: wes hayutin
Depends On:
Blocks: 568421 636830
TreeView+ depends on / blocked
Reported: 2010-05-12 12:50 UTC by spandey
Modified: 2015-04-23 23:56 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-10-03 00:56:55 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description spandey 2010-05-12 12:50:27 UTC
Description of problem:

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

How reproducible:

Prerequisites : 
server : cert-fte-candlepin.devlab.redhat.com
client : Rhel 6 client 
SM : version 60

Steps to Repro : 
Register client to candlepin
subscribe for product 
Edit /etc/yum/pluginconf.d/rhsmplugin.conf and ensure that the enabled directive is set to 0
 Run a 'yum repolist' and get a list of all of the available repositories corresponding to your entitled products

Expected Result : 
Repolist does not contain repositories corresponding to your entitled products

Actual Result : 
Repolist contains repositories corresponding to  entitled products

Comment 1 Bryan Kearney 2010-06-03 12:54:23 UTC
Please verify both in on premises and hosted.

Comment 2 James Bowes 2010-07-13 14:10:21 UTC
I think this is as designed for the plugin. Reassigning to the client folk so they can comment more.

Comment 4 RHEL Program Management 2010-07-15 14:25:59 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 5 wes hayutin 2010-07-22 18:23:35 UTC
raising priority, recreated this morning

Comment 6 Adrian Likins 2010-10-01 16:35:04 UTC
Looks like we create the repo files when the rhsmplugin is enabled. Then if we disable it, it doesn't run and can not remove the repo files. 

It should be able to add those repo's dynamically without creating the repo files
[1]. We would probably need to cache the repo data somewhere if we don't want to have to generate it from the certs everytime. skvidal seems to indicate this is doable.

[1] though, it is nice to have actual repo files for every repo, just from a sanity standpoint.

Comment 7 Jeff Ortel 2010-10-01 19:09:25 UTC
This works as designed!

The rhsmplugin is *not* the rhnplugin and should not be expected to behave like it.  The plugin is for synchronizing the .repo file with entitlement certificates.  So, if you want to disable the redhat repos, edit the .repo file (enabled=0) after you've disabled the rhsmplugin.  Or, IIRC, you can disable in PackageKit.  Managing an actual repo file provides greater flexibility for system admins and is a more "yum-like" approach.  Changing rhsmplugin to dynamically load the repos (like rhnplugin) would be a big regression, IHMO.

Comment 8 Bryan Kearney 2010-10-01 20:26:40 UTC
jeff.. one question before I close this out...

If I susbcribe via rhsm, and the content set is set to enabled. If I disable it manually via direct editing of the /etc/yum/[REPO FILE] will the plugin respect my change? Said another way, is the enabled bit a default?

Comment 9 Jeff Ortel 2010-10-01 21:04:48 UTC
Short answer is yes.  The rhsm backend (repolib) defines properties in the .repo file that it manages as mutable (or not).  Mutable properties are allowed to be manually edited.  That is, if you edit the .repo file, rhsm will respect your changes.  Non-mutable properties (such as baseurl) are strictly managed by rhsm and outside changes are not respected.  They are corrected as needed when repolib does it's merge.  Other properties (those not known to rhsm) are also left unchanged.  So, you can add extra properties to a repo defined in the .repo file and rhsm will also leave those alone.

Comment 10 Jeff Ortel 2010-10-01 21:06:20 UTC
The rhsm backend was designed to work in harmony with system administrators who might want to exit the .repo file.  Or, other applications such as PackageKit.

Comment 11 Bryan Kearney 2010-10-03 00:56:55 UTC
Per this dicussion, I am closing as not a bug.

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