Bug 736784
| Summary: | subscription-manager config --remove adds config property to rhsm.conf if it doesn't exist | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Michael Stead <mstead> |
| Component: | subscription-manager | Assignee: | William Poteat <wpoteat> |
| Status: | CLOSED ERRATA | QA Contact: | John Sefler <jsefler> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.2 | CC: | jmolet, wpoteat |
| 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: | 2011-12-06 17:24:09 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 682238, 743047 | ||
|
Description
Michael Stead
2011-09-08 17:05:28 UTC
Having discussed this with wpoteat earlier this week, I've learned that this behavior is a feature! - albeit a harmless feature - a feature of the python library being used to read/set parameters. Nevertheless a valid bug. setting Severity to "low"... Actually, it should not add the entry on remove. Added additional checking to stop this from happening. # rpm -q subscription-manager subscription-manager-0.96.9-1.git.8.4e7d06b.el6.x86_64 # rpm -q python-rhsm python-rhsm-0.96.11-1.git.7.4aaef6e.el6.noarch # subscription-manager config --remove rhsmcertd.unknown-prop exit expected at most 1 arguments, got 2 moving back to NEW/FailedQA... I suspect a needed commit for python-rhsm has not happened yet. Including a commit hash (in comment 3) is always helpful when moving a bug to MODIFIED. Now working as expected: [root@jmolet-vm0 ~]# cat /etc/rhsm/rhsm.conf | grep unknown_prop [root@jmolet-vm0 ~]# subscription-manager config --remove rhsmcertd.unknown_prop Error: Section rhsmcertd and name unknown_prop does not exist. [root@jmolet-vm0 ~]# cat /etc/rhsm/rhsm.conf | grep unknown_prop python-rhsm-0.96.12-1.git.0.4862863.el6.noarch subscription-manager-firstboot-0.96.11-1.git.1.945da16.el6.x86_64 subscription-manager-0.96.11-1.git.1.945da16.el6.x86_64 subscription-manager-gnome-0.96.11-1.git.1.945da16.el6.x86_64 Marking VERIFIED. [root@jsefler-onprem-62server ~]# subscription-manager config --remove rhsmcertd.unknown_prop 1>/tmp/stdout 2>/tmp/stderr [root@jsefler-onprem-62server ~]# echo $? 255 [root@jsefler-onprem-62server ~]# cat /tmp/stderr [root@jsefler-onprem-62server ~]# cat /tmp/stdout Error: Section rhsmcertd and name unknown_prop does not exist. [root@jsefler-onprem-62server ~]# moving back to ASSIGNED... THE ERROR MESSAGE SHOULD BE WRITTEN TO STDERR NOT STDOUT. Written with sys.stderr.write for ConfigCommand errors. Commit 600f2813db4471955e9f1efdfe4a5a1d270f7133 [root@jmolet-vm0 ~]# subscription-manager config --remove rhsmcertd.unknown_prop 1> /tmp/stdout 2> /tmp/stderr [root@jmolet-vm0 ~]# echo $? 255 [root@jmolet-vm0 ~]# cat /tmp/stderr Error: Section rhsmcertd and name unknown_prop does not exist. [root@jmolet-vm0 ~]# cat /tmp/stdout [root@jmolet-vm0 ~]# errors are going to /tmp/stderr as they should now. Tested against: subscription-manager-0.96.11-1.git.9.b453a83.el6.x86_64 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. http://rhn.redhat.com/errata/RHBA-2011-1695.html |