Sinscription-manager-s yum plugin prints warning to stdout instead of stderr. Description of problem: When invoking yum with subscription-manager, it prints message about not being registered to stdout instead of stderr. This is confusing mainly for scripts processing output of yum. Version-Release number of selected component (if applicable): # rpm -q subscription-manager subscription-manager-1.1.22-1.el6.x86_64 How reproducible: always/deterministic Steps to Reproduce: 1. Make sure you are unregistered. 2. # yum repolist > stdout.log 2> stderr.log Actual results: > # cat stdout.log > Loaded plugins: product-id, rhnplugin, security, subscription-manager > This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. ... > #cat stderr.log > This system is not registered with RHN Classic or RHN Satellite. > You can use rhn_register to register. > RHN Satellite or RHN Classic support will be disabled. Expected results: Message about not being registered should be issued on stderr.
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux.
https://github.com/candlepin/subscription-manager/pull/485
commit 836e52bf583341f9781dfe10c7da348a606cf83d Author: Bryan Kearney <bkearney> Date: Fri Jan 25 13:28:35 2013 -0500 901612: Yum plugin warnings should go to stderr, not stdout
Fixed in the 1.8.2 version of subscription-manager or python-rhsm
# rpm -qa | egrep "subscription-manager|python-rhsm" python-rhsm-1.8.3-1.el7.x86_64 subscription-manager-gui-1.8.3-1.el7.x86_64 subscription-manager-migration-1.8.3-1.el7.x86_64 subscription-manager-debuginfo-1.8.3-1.el7.x86_64 subscription-manager-1.8.3-1.el7.x86_64 subscription-manager-firstboot-1.8.3-1.el7.x86_64 python-rhsm-debuginfo-1.8.3-1.el7.x86_64 # subscription-manager clean All local data removed # subscription-manager unregister This system is currently not registered. # yum repolist --enablerepo=rel-eng-latest > stdout.log 2> stderr.log # cat stdout.log Loaded plugins: product-id, subscription-manager repo id repo name status rel-eng-latest latest-RHEL7 Server on x86_64 4,276 repolist: 4,276 # cat stderr.log This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. VERIFIED
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
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-2013-1332.html
Apologies but we have to revert this fix due to https://bugzilla.redhat.com/show_bug.cgi?id=1017354 (and others) This caused more problems than the original behaviour and after discussion, we feel the original behaviour was correct, these are not error messages, they are informational only, and belong on stdout. (not stderr) Any script parsing yum output would need to be able to handle this and only extract the information it needs, but this is the nature of parsing command output, particularly when the command has a plugin architecture like yum. Sorry for any complications but we need to revert the fix in the next subscription-manager release.