Bug 1331739
Summary: | subscription-manager repo-override --remove= (with an empty string) --repo=<id> behaves like --remove-all | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Rehana <redakkan> |
Component: | subscription-manager | Assignee: | Kevin Howell <khowell> |
Status: | CLOSED ERRATA | QA Contact: | John Sefler <jsefler> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 7.3 | CC: | csnyder, khowell, redakkan, vrjain |
Target Milestone: | rc | Keywords: | EasyFix, Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-08-01 19:18:42 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
Rehana
2016-04-29 12:22:22 UTC
In my opinion this is not a bug, but a misinterpreted python argument As written in the problem description comment 0, the "--repo=rhel-7-server-rhceph-1.3-tools-debug-rpms" is being interpreted as the value for the --remove option. If you re-arrange the arguments you will get the expected results... [root@jsefler-rhel7 ~]# subscription-manager repo-override --remove --repo=rhel-7-server-rhceph-1.3-tools-debug-rpms Error: You must specify a repository to modify [root@jsefler-rhel7 ~]# ^^ That is a repeat of comment 0 where "--repo=rhel-7-server-rhceph-1.3-tools-debug-rpms" is being interpreted as the value for --remove Now let's just change the order of the arguments... [root@jsefler-rhel7 ~]# subscription-manager repo-override --repo=rhel-7-server-rhceph-1.3-tools-debug-rpms --remove Usage: subscription-manager repo-override [OPTIONS] subscription-manager: error: --remove option requires an argument [root@jsefler-rhel7 ~]# VERIFIED: I would agree with the tool's response, the --remove option does indeed require an argument (the name of the override to remove). After discussing with John , it came to our notice that the original bug is slightly different. Observed that "subscription-manager repo-override --remove= --repo=<repo id> " ==> removes all the repo-overrides from the specified repo like the --remove-all option Its the same for the --remove="" options too Steps: ======== # subscription-manager repo-override --list Repository: bar xyz: 2 Repository: foo abc: 1 efg: 1 # subscription-manager repo-override --repo=foo --remove= # subscription-manager repo-override --list Repository: bar xyz: 2 ^^ REMOVED OVERRIDES FROM --FOO REPO # subscription-manager repo-override --repo=bar --remove="" # subscription-manager repo-override --list This system does not have any content overrides applied to it. ^^ REMOVED OVERRIDES FROM --BAR REPO ,leaving no overrides on the system Expected results: Appropriate error message should be displayed when no name value is specified for --remove option ex: name: many not be null The reason why we are suggesting that "name: may not be null" is the expected result of subscription-manager repo-override --repo=bar --remove="" is because it complements the current behavior of --add when an empty string is passed as the name of the repo parameter [root@jsefler-rhel7 ~]# subscription-manager repo-override --repo=bar --add="":VALUE name: may not be null [root@jsefler-rhel7 ~]# subscription-manager repo-override --repo=bar --add=:VALUE name: may not be null [root@jsefler-rhel7 ~]# subscription-manager repo-override --repo=bar --add :VALUE name: may not be null [root@jsefler-rhel7 ~]# Retested on , subscription management server: 0.9.51.21-1 subscription management rules: 5.15.1 subscription-manager: 1.19.4-1.el7 python-rhsm: 1.19.2-1.el7 # subscription-manager repo-override --repo=rhel-7-server-rh-common-debug-rpms --remove= Error: You must specify an override name with --remove. # subscription-manager repo-override --repo=rhel-7-server-rh-common-debug-rpms --remove="" Error: You must specify an override name with --remove. # subscription-manager repo-override --remove= --repo=rhel-7-server-rh-common-debug-rpms Error: You must specify an override name with --remove. # subscription-manager repo-override --remove="" --repo=rhel-7-server-rh-common-debug-rpms Error: You must specify an override name with --remove. # subscription-manager repo-override --list Repository: rhel-7-server-extras-rpms enabled: 1 gpgcheck: 1 Repository: rhel-7-server-rh-common-debug-rpms enabled: 1 new: testing test: true Observed that now when no value is given for the option --remove ,an appropriate error message "Error: You must specify an override name with --remove." is displayed and none of the overrides were removed. Marking as 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://access.redhat.com/errata/RHBA-2017:2083 |