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 1034396 - repo-override command should not require entitlements
Summary: repo-override command should not require entitlements
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michael Stead
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2013-11-25 18:30 UTC by Michael Stead
Modified: 2014-06-18 00:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:55:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Michael Stead 2013-11-25 18:30:29 UTC
Description of problem:

Currently subscription-manager's repo-override command requires at least one entitlement in order to execute. This requirement should be removed as overrides live for the life of the consumer. For example, consider a repo override that has been added for 'repo1', which is provided by ent 1. If ent one is removed, the override remains. If no other ents exist, it is not possible to list/remove the override.

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


How reproducible:
Always

Steps to Reproduce:
1. Attach a subscription that provides content from a repository.
2. Add an override for any repo (existing or not)
subscription-manager repo-override --repo test-repo --add foo:1
3. Remove all subscriptions:
subscription-manager remove --all
4. List all overrides
subscription-manager repo-override
This system does not have any subscriptions.

Actual results:

After removing all subscriptions and listing overrides:

subscription-manager repo-override
This system does not have any subscriptions.


Expected results:

After removing all subscriptions and listing overrides, you should see the initial overrides that you created  in step 2.

Additional info:

This is not limited to the --list option of repo-override. A user should be able to perform any override oprations when they have no subscriptions attached.

Comment 1 Michael Stead 2013-11-27 13:06:46 UTC
Patch waiting on review:

https://github.com/candlepin/subscription-manager/pull/832

Comment 2 Michael Stead 2013-11-27 15:27:04 UTC
Available in:

subscription-manager-1.10.8-1

Comment 4 John Sefler 2013-12-06 17:47:30 UTC
Verifying Version...
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.10.8-1.el7
python-rhsm: 1.10.8-1.el7

[root@jsefler-7 ~]# subscription-manager register --serverurl=jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin
Username: testuser1
Password: 
Organization: admin
The system has been registered with ID: 51c808aa-f9b0-45a7-bd6b-e4b9b561c596 
[root@jsefler-7 ~]# subscription-manager repos --list
This system has no repositories available through subscriptions.
[root@jsefler-7 ~]# subscription-manager repo-override --list
This system does not have any content overrides applied to it.
[root@jsefler-7 ~]# subscription-manager repo-override --add=foo:bar --repo=my-repo
Repository 'my-repo' does not currently exist, but the override has been added.
[root@jsefler-7 ~]# subscription-manager repo-override --list
Repository: my-repo
  foo: bar

[root@jsefler-7 ~]# subscription-manager list --avail | grep Pool | tail -1
Pool ID:           8a90874042bf59cd0142bf5a9fbf0832
[root@jsefler-7 ~]# subscription-manager attach --pool 8a90874042bf59cd0142bf5a9fbf0832
Successfully attached a subscription for: RAM/Cores Package (8GB, 4 cores)
[root@jsefler-7 ~]# subscription-manager repos --list | head -8
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   awesomeos
Repo Name: awesomeos
Repo URL:  https://cdn.redhat.com/path/to/$basearch/$releasever/awesomeos
Enabled:   0

[root@jsefler-7 ~]# subscription-manager repo-override --add=enabled:1 --repo=awesomeos
[root@jsefler-7 ~]# subscription-manager repos --list | head -8
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   awesomeos
Repo Name: awesomeos
Repo URL:  https://cdn.redhat.com/path/to/$basearch/$releasever/awesomeos
Enabled:   1

[root@jsefler-7 ~]# subscription-manager repo-override --list
Repository: awesomeos
  enabled: 1

Repository: my-repo
  foo: bar

[root@jsefler-7 ~]# subscription-manager remove --all
1 subscription removed at the server.
1 local certificate has been deleted.
[root@jsefler-7 ~]# subscription-manager repo-override --list
Repository: awesomeos
  enabled: 1

Repository: my-repo
  foo: bar

[root@jsefler-7 ~]# subscription-manager repo-override --remove-all 
[root@jsefler-7 ~]# subscription-manager repo-override --list
This system does not have any content overrides applied to it.


VERIFIED: repo-overrides can now be manipulated independent of attached subscriptions.

Comment 5 Ludek Smid 2014-06-13 09:55:33 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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