Bug 1114126

Summary: container mode message should go to stderr
Product: Red Hat Enterprise Linux 6 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: bkearney, fsharath, jesusr
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
no documentation required
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 07:47:29 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:
Bug Depends On:    
Bug Blocks: 1014343    

Description John Sefler 2014-06-27 20:12:16 UTC
Description of problem:
When attempting to run subscription-manager in container mode, the command exits with code 255, but the error message is being written to stdout.  It should probably be written to stderr.


Version-Release number of selected component (if applicable):
[root@jsefler-6 ~]# rpm -q subscription-manager
subscription-manager-1.12.4-1.el6.x86_64

How reproducible:


Steps to Reproduce:
[root@jsefler-6 ~]# mkdir /etc/rhsm-host
[root@jsefler-6 ~]# subscription-manager version 1>/tmp/stdout 2>/tmp/stderr
[root@jsefler-6 ~]# echo $?
255
[root@jsefler-6 ~]# cat /tmp/stdout
subscription-manager is disabled when running inside a container. Please refer to your host system for subscription management.
[root@jsefler-6 ~]# cat /tmp/stderr
[root@jsefler-6 ~]# 



Actual results:
above

Expected results:
stdout should be empty
stderr should be "subscription-manager is disabled when running inside a container. Please refer to your host system for subscription management."

Additional info:

Comment 1 Chris Snyder 2014-07-09 13:17:11 UTC
Should be in as of commit: 648f9a39533b7a08855f06f1a08af20d4d9659d0

Comment 3 Sharath Dwaral 2014-08-04 13:07:48 UTC
Verification:

# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.9.21-1
subscription management rules: 5.11
subscription-manager: 1.12.11-1.el6
python-rhsm: 1.12.5-1.el6

# mkdir /etc/rhsm-host
# subscription-manager version 1>/tmp/stdout 2>/tmp/stderr
# echo $?
255

# cat /tmp/stdout
# cat /tmp/stderr
subscription-manager is disabled when running inside a container. Please refer to your host system for subscription management.

VERIFIED

Comment 5 errata-xmlrpc 2014-10-14 07:47:29 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.

http://rhn.redhat.com/errata/RHBA-2014-1384.html