Bug 1660883

Summary: Missleading error on enable repo if the system is not registered
Product: Red Hat Enterprise Linux 7 Reporter: Irina Gulina <igulina>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: low Docs Contact:
Priority: medium    
Version: 7.7-AltCC: cdonnell, csnyder, jsefler, khowell, skallesh, wpoteat
Target Milestone: rcKeywords: EasyFix, StringChange, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 19:22:40 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 Irina Gulina 2018-12-19 13:58:01 UTC
Description of problem:
The error says that <name> doesn't match a valid repo ID and suggests to check "subscription-manager repos --list". The repo ID name is valid. It's just that the system has not been registered yet.

Version-Release number of selected component (if applicable):
>> cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.6 (Maipo)

How reproducible:
always

Steps to Reproduce:
1. don't register the system
2. 
>> sudo subscription-manager repos --enable=<some_valid_repo_name>

Error: 'some_valid_repo_name' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories.

WARNING

The yum/dnf plugins: /etc/yum/pluginconf.d/subscription-manager.conf, /etc/yum/pluginconf.d/product-id.conf were automatically enabled for the benefit of Red Hat Subscription Management. If not desired, use "subscription-manager config 
3. 
>>sudo subscription-manager repos --list
This system has no repositories available through subscriptions.


Actual results:


Expected results:
I would appreciate the error: "This system has no repositories available through subscriptions." or similar at step #2 instead of the current error message. Otherwise, I think that I used a wrong repo name.

Comment 2 Kevin Howell 2019-01-14 15:26:34 UTC
Let's change the language to say the repo is "unavailable" rather than invalid.

Comment 7 Shwetha Kallesh 2020-04-16 06:39:11 UTC
Reproducer:
[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager repos --enable rhel-7-server-openstack-13-rpms
Error: 'rhel-7-server-openstack-13-rpms' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories.


Verification:

[root@hpe-dl380pgen8-02-vm-4 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 2.9.21-1
subscription management rules: 5.37
subscription-manager: 1.24.32

[root@hpe-dl380pgen8-02-vm-4 ~]# subscription-manager repos --enable rhel-7-server-openstack-13-rpms
This system has no repositories available through subscriptions.

Comment 9 errata-xmlrpc 2020-09-29 19:22:40 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 (subscription-manager bug fix update), 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://access.redhat.com/errata/RHBA-2020:3866