Bug 901612 - Subscription-manager-s yum plugin prints warning to stdout instead of stderr.
Summary: Subscription-manager-s yum plugin prints warning to stdout instead of stderr.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.10
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 5.10
Assignee: Bryan Kearney
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel510 rhsm-2013
TreeView+ depends on / blocked
 
Reported: 2013-01-18 16:08 UTC by Matej Kollar
Modified: 2015-07-26 22:21 UTC (History)
6 users (show)

Fixed In Version: 1.8.2
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2013-09-30 22:54:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1017354 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Product Errata RHBA-2013:1332 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-09-30 22:49:24 UTC

Internal Links: 1017354

Description Matej Kollar 2013-01-18 16:08:36 UTC
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.

Comment 2 RHEL Program Management 2013-01-22 06:48:18 UTC
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.

Comment 5 Bryan Kearney 2013-01-29 14:33:42 UTC
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

Comment 6 Bryan Kearney 2013-02-08 17:18:47 UTC
Fixed in the 1.8.2 version of subscription-manager or python-rhsm

Comment 7 Sharath Dwaral 2013-02-25 15:45:24 UTC
# 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

Comment 8 RHEL Program Management 2013-04-09 20:52:34 UTC
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.

Comment 10 errata-xmlrpc 2013-09-30 22:54:48 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-2013-1332.html

Comment 11 Devan Goodwin 2014-01-30 14:04:31 UTC
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.


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