Bug 1660883 - Missleading error on enable repo if the system is not registered
Summary: Missleading error on enable repo if the system is not registered
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.7-Alt
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: ---
Assignee: William Poteat
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-19 13:58 UTC by Irina Gulina
Modified: 2020-09-29 19:22 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:22:40 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:3866 0 None None None 2020-09-29 19:22:58 UTC

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


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