Bug 1351009
Summary: | Error when disable all repos by 'subscription-manager repos --disable=*' | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | qianzhan |
Component: | subscription-manager | Assignee: | William Poteat <wpoteat> |
Status: | CLOSED ERRATA | QA Contact: | John Sefler <jsefler> |
Severity: | low | Docs Contact: | |
Priority: | high | ||
Version: | 6.8 | CC: | csnyder, jsefler, jsherril, redakkan, skallesh, vrjain, wpoteat |
Target Milestone: | rc | Keywords: | 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: | 2017-03-21 10:55:27 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
qianzhan
2016-06-29 03:11:19 UTC
John, please confirm the issue - John This is working for me against the production entitlement server using the same subscription-manager package... [root@jsefler-rhel6 ~]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 0.9.51.11-1 subscription management rules: 5.15 subscription-manager: 1.16.8-8.el6 python-rhsm: 1.16.6-1.el6 [root@jsefler-rhel6 ~]# subscription-manager register --auto-attach Registering to: subscription.rhsm.redhat.com:443/subscription Username: qa Password: The system has been registered with ID: 0e6059e8-ec21-4bc3-a50c-c6214a6f37b6 Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed [root@jsefler-rhel6 ~]# subscription-manager repos --disable=* Repository 'rhel-lb-for-rhel-6-server-eus-rpms' is disabled for this system. Repository 'rhel-6-server-rhs-client-1-source-rpms' is disabled for this system. Repository 'rhs-big-data-3-for-rhel-6-server-source-rpms' is disabled for this system. Repository 'rhel-6-server-mrg-messaging-3-source-rpms' is disabled for this system. Repository 'a-mq-interconnect-1-for-rhel-6-server-beta-rpms' is disabled for this system. <... cutting out a lot of repos ...> Repository 'rhel-server-ose-jbosseap-6-beta-debug-rpms' is disabled for this system. Repository 'rhel-6-server-hts-beta-rpms' is disabled for this system. Repository 'rhel-server-ost-6-folsom-source-rpms' is disabled for this system. Repository 'rhel-6-server-rhv-4-agent-beta-debug-rpms' is disabled for this system. [root@jsefler-rhel6 ~]# echo $? 0 Is it possible that satellite6.2 is the problem? I'm not able to reproduce this error with a normally registered system: [root@client ~]# subscription-manager repos --disable=* Repository 'rhel-server-rhscl-6-rpms' is disabled for this system. Repository 'rhel-6-server-rpms' is disabled for this system. However, if the system does not have any repositories available for it, you do seem to get that error: [root@client ~]# subscription-manager remove --all 1 subscription removed at the server. 1 local certificate has been deleted. [root@client ~]# subscription-manager repos --disable=* Error: * is not a valid repository ID. Use --list option to see valid repositories. subscription-manager-1.16.8-8.el6.x86_64 python-rhsm-1.16.6-1.el6.x86_64 yum-3.2.29-74.el6.noarch I'm guessing this is expected behavior, but i could see an argument for --disable=* to not error if there are no repositories available. Thank you jsherrill for identifying the reproducer. This is indeed a specialty use case - attempt to disable all repos using wildcard * when there are no entitled repos to disable. If you attempt this use case and follow the instructional response from subscription manager, "Use --list option to see valid repositories.", you quickly determine the issue as shown below: "This system has no repositories available through subscriptions." [root@jsefler-rhel7 ~]# subscription-manager repos --disable=* Error: * is not a valid repository ID. Use --list option to see valid repositories. [root@jsefler-rhel7 ~]# subscription-manager repos --list This system has no repositories available through subscriptions. My suggestion would be for the last instruction to be more explicit to avoid interpretation "subscription-manager --list" which is a completely different command. change this: "Use --list option to see valid repositories." to this: "Use \"subscription-manager repos --list\" to see valid repositories." At the point this is delivered, it does not know if there are no repos, or if they just aren't any matches. I have put in Error: '*' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories. Error: 'content-label-no-g' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories. So it can be accurate either way. Verifying on RHEL-7.3-RC-2.0 against Satellite-6.2.0-RHEL-7-20160907.6: subscription-manager: 1.17.15-1.el7 python-rhsm: 1.17.9-1.el7 [root@dhcp-129-115 ~]# subscription-manager register Registering to: sun-x4200-01.rhts.eng.bos.redhat.com:443/rhsm Username: admin Password: The system has been registered with ID: bf4b88b1-5235-42bb-954d-a2bb73c1d989 [root@dhcp-129-115 ~]# subscription-manager attach Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed [root@dhcp-129-115 ~]# subscription-manager repos --disable=* Error: '*' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories. [root@dhcp-129-115 ~]# subscription-manager repos --disable=qqq Error: 'qqq' does not match a valid repository ID. Use "subscription-manager repos --list" to see valid repositories. Moving ON_QA to VERIFIED. 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/RHSA-2017-0698.html |