RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1162331 - inconsistent stdout/stderr between subscription-manager and rhsm-debug tool when not registered.
Summary: inconsistent stdout/stderr between subscription-manager and rhsm-debug tool w...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Chris "Ceiu" Rog
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel71
TreeView+ depends on / blocked
 
Reported: 2014-11-10 20:45 UTC by John Sefler
Modified: 2015-03-05 13:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 13:16:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0502 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2015-03-05 16:20:39 UTC

Description John Sefler 2014-11-10 20:45:03 UTC
Description of problem:
As a result of subscription-manager commit 5697e3af094be921ade01e19e1dfe7b548fb7d5b Further improved exit code standardization, there is an inconsistent use of stdout/stderr.



Version-Release number of selected component (if applicable):
[root@jsefler-os7 ~]# rpm -q subscription-manager
subscription-manager-1.13.8-1.git.0.cc14dc6.el7.x86_64

How reproducible:


Steps to Reproduce:
[root@jsefler-os7 ~]# subscription-manager unregister
This system is currently not registered.


[root@jsefler-os7 ~]# subscription-manager identity 1>/tmp/stdout 2>/tmp/stderr
[root@jsefler-os7 ~]# echo $?
1
[root@jsefler-os7 ~]# cat /tmp/stdout
[root@jsefler-os7 ~]# cat /tmp/stderr
This system is not yet registered. Try 'subscription-manager register --help' for more information.
[root@jsefler-os7 ~]# 


[root@jsefler-os7 ~]# rhsm-debug system 1>/tmp/stdout 2>/tmp/stderr
[root@jsefler-os7 ~]# echo $?
1
[root@jsefler-os7 ~]# cat /tmp/stdout
This system is not yet registered. Try 'subscription-manager register --help' for more information.
[root@jsefler-os7 ~]# cat /tmp/stderr
[root@jsefler-os7 ~]# 


Actual results:
above

Expected results:
the stdout/stderr report from rhsm-debug tool should be reversed

Additional info:

Comment 1 Chris "Ceiu" Rog 2014-11-14 14:15:25 UTC
commit 8dc4250beb42c0155c7afc4ba95506458b628353
Merge: aa75cf4 a695ef2
Author: William Poteat <wpoteat>
Date:   Thu Nov 13 13:19:08 2014 -0600

    Merge pull request #1072 from candlepin/crog/1162331
    
    1162331: Changed how debug_commands.py prints errors.

Comment 3 Shwetha Kallesh 2014-11-24 07:55:33 UTC
Marking verified!!

[root@dhcp35-236 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.9.36-1
subscription management rules: 5.11
subscription-manager: 1.13.9-1.el7
python-rhsm: 1.13.8-1.el7


[root@dhcp35-236 ~]# subscription-manager identity
This system is not yet registered. Try 'subscription-manager register --help' for more information.
[root@dhcp35-236 ~]# 
[root@dhcp35-236 ~]# subscription-manager identity 1>/tmp/stdout 2>/tmp/stderr
[root@dhcp35-236 ~]# echo $?
1
[root@dhcp35-236 ~]# cat /tmp/stdout
[root@dhcp35-236 ~]# cat /tmp/stderr
This system is not yet registered. Try 'subscription-manager register --help' for more information.
[root@dhcp35-236 ~]# rhsm-debug system 1>/tmp/stdout 2>/tmp/stderr
[root@dhcp35-236 ~]# echo $?
1
[root@dhcp35-236 ~]# cat /tmp/stdout
[root@dhcp35-236 ~]# cat /tmp/stderr
This system is not yet registered. Try 'subscription-manager register --help' for more information.

Comment 5 errata-xmlrpc 2015-03-05 13:16:12 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, 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/RHBA-2015-0502.html


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