Bug 1257943

Summary: Subscription-manager repo-override command does not show any warning when manage_repos = 0 in /etc/rhsm/rhsm.conf file
Product: Red Hat Enterprise Linux 7 Reporter: Shwetha Kallesh <skallesh>
Component: subscription-managerAssignee: Filip Nguyen <fnguyen>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: crog, fnguyen
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 11:50:55 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 2015-08-28 12:39:57 UTC
Description of problem:
When you try to override a repo when manage_repos = 0 , it would be nice to see a warning message 

Version-Release number of selected component (if applicable):
[root@dhcp35-166 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.0.6-1
subscription management rules: 5.16
subscription-manager: 1.16.1-1.git.18.e01bed3.el7
python-rhsm: 1.16.1-1.git.1.306b3b3.el7


How reproducible:


Steps to Reproduce:
[root@dhcp35-166 ~]# cat /etc/rhsm/rhsm.conf | grep manage_repos
manage_repos = 0

[root@dhcp35-166 ~]# subscription-manager repos --list
Repositories disabled by configuration.

[root@dhcp35-166 ~]# subscription-manager repo-override --list
Repository: content-label
  ena: foo

Repository: foo
  en: foo

it would be nice to see a warning message when you try to list the overrides if manage_repos is false  


Actual results:


Expected results:


Additional info:

Comment 3 Chris "Ceiu" Rog 2015-09-24 20:54:23 UTC
commit 8530c903483ff0667f3f448e5434267a231b87be
Author: Filip Nguyen <fnguyen>
Date:   Tue Sep 8 12:40:49 2015 +0200

    1257943:Adding a warning to repo-override command when manage_repos = 0

Comment 5 John Sefler 2015-09-29 23:12:14 UTC
Verifying Version....
[root@jsefler-7 ~]# rpm -q subscription-manager
subscription-manager-1.15.9-12.el7.x86_64

[root@jsefler-7 ~]# subscription-manager config --rhsm.manage_repos=0
[root@jsefler-7 ~]# 
[root@jsefler-7 ~]# 
[root@jsefler-7 ~]# subscription-manager repo-override --list
Repositories disabled by configuration.
This system does not have any content overrides applied to it.
[root@jsefler-7 ~]# 
[root@jsefler-7 ~]# 
[root@jsefler-7 ~]# subscription-manager repo-override --add=foo:bar --repo=override-repo
Repositories disabled by configuration.
Repository 'override-repo' does not currently exist, but the override has been added.
[root@jsefler-7 ~]# 
[root@jsefler-7 ~]# 
[root@jsefler-7 ~]# subscription-manager repo-override --list
Repositories disabled by configuration.
Repository: override-repo
  foo: bar

[root@jsefler-7 ~]# 
[root@jsefler-7 ~]# 
[root@jsefler-7 ~]# subscription-manager repo-override --remove=foo --repo=override-repo
Repositories disabled by configuration.
[root@jsefler-7 ~]# 
[root@jsefler-7 ~]# 
[root@jsefler-7 ~]# subscription-manager config --rhsm.manage_repos=1
[root@jsefler-7 ~]# subscription-manager repo-override --list
This system does not have any content overrides applied to it.
[root@jsefler-7 ~]# 


VERIFIED: In each of the above calls to repo-override while manage_repos was configured to 0, the stdout feedback began with an informative message 'Repositories disabled by configuration.'.

Comment 6 errata-xmlrpc 2015-11-19 11:50:55 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://rhn.redhat.com/errata/RHBA-2015-2122.html