Bug 833146 - subscription-manager release --list ignores command line proxy options
Summary: subscription-manager release --list ignores command line proxy options
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.9
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: William Poteat
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On: 824530
Blocks: 771748
TreeView+ depends on / blocked
 
Reported: 2012-06-18 17:31 UTC by Alex Wood
Modified: 2013-01-08 03:55 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 824530
Environment:
Last Closed: 2013-01-08 03:55:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0033 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-01-08 08:38:27 UTC

Description Alex Wood 2012-06-18 17:31:08 UTC
+++ This bug was initially created as a clone of Bug #824530 +++

Description of problem:
Very similar to bug 664548, CLI calls to subscription-manager release --list are ignoring the command line proxy options.  If the user specifies a proxy using command line options, then these values should override corresponding proxy settings in the rhsm.conf file.

Version-Release number of selected component (if applicable):
[root@kvm-guest-02 ~]# rpm -q subscription-manager
subscription-manager-0.99.19-1.el6.x86_64


How reproducible:


Steps to Reproduce:
[root@kvm-guest-02 ~]# subscription-manager config --server.hostname subscription.rhn.stage.redhat.com

[root@kvm-guest-02 ~]# grep proxy /etc/rhsm/rhsm.conf 
# an http proxy server to use
proxy_hostname=
# port for http proxy server
proxy_port=
# user name for authenticating to an http proxy, if needed
proxy_user=
# password for basic http proxy auth, if needed
proxy_password=

[root@kvm-guest-02 ~]# subscription-manager register --username stage_test_12 --autosubscribe
Password: 
The system has been registered with id: 0c90c556-58fb-42d6-b9f9-f5da0a4c06a5 
Installed Product Current Status:
Product Name:         	Red Hat Enterprise Linux Server
Status:               	Subscribed               

[root@kvm-guest-02 ~]# subscription-manager release --list
6.1
6.2
6Server
^^^^^^^ THESE RESULTS DEMOSTRATE release --list WITHOUT ANY PROXY USAGE

[root@kvm-guest-02 ~]# subscription-manager release --list --proxy REDHAT:PORT --proxyuser SHADOW --proxypassword MAN
6.1
6.2
6Server
^^^^^^^ DID NOT EXPECT THESE RESULTS SINCE WE SPECIFIED (BOGUS) PROXY ARGUMENTS.
EXPECTED TO SEE: 
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
  


Additional Info:
Not demonstrated above but demonstrated in the verification of bug 822965, the release --list command successfully acknowledges server proxy configurations set in the rhsm.conf file.  This new bug is concerned with release --list command failing to acknowledge proxy configuration values passed as command line arguments.

--- Additional comment from alikins on 2012-06-14 09:38:37 EDT ---

commit eb1cfcd5c1f3d00b8cbd16e7f0499154fa4e5d28
Author: Adrian Likins <alikins>
Date:   Fri Jun 8 14:15:53 2012 -0400

    824530: add test case for setting proxy cli for release

commit d2deced0bb879046150999578b02dfe03ce6d4c3
Author: Adrian Likins <alikins>
Date:   Fri Jun 8 09:41:23 2012 -0400

    824530: "release" command ignoring cli proxy options
    
    We were reading them, and setting them, then clobbering
    them with the cfg settings in the base class init. Refactor
    slightly to fix this.

Comment 2 RHEL Program Management 2012-06-18 17:47:23 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 3 Sharath Dwaral 2012-06-21 16:59:09 UTC
Version

RHEL 5.9

# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-migration-1.0.4-1.git.1.b28337e.el5
subscription-manager-migration-data-1.11.1.1-1.git.2.c7fbafe.el5
python-rhsm-1.0.2-1.git.2.d5c3d05.el5
subscription-manager-firstboot-1.0.4-1.git.1.b28337e.el5
subscription-manager-1.0.4-1.git.1.b28337e.el5
subscription-manager-gui-1.0.4-1.git.1.b28337e.el5


Actual Result:

# grep proxy /etc/rhsm/rhsm.conf

# an http proxy server to use
proxy_hostname = 
# port for http proxy server
proxy_port =
# user name for authenticating to an http proxy, if needed
proxy_user =
# password for basic http proxy auth, if needed
proxy_password =

# subscription-manager register --username stage_test_12 --autosubscribe
This system is already registered. Use --force to override

# subscription-manager register --username stage_test_12 --autosubscribe --force
Password: 
The system has been registered with id: 6b0a201e-db06-44a6-b4a1-a0184aa2d1be 
Installed Product Current Status:
Product Name:         	Awesome OS for ia64 Bits
Status:               	Not Subscribed

Product Name:         	Stackable with Awesome OS for x86_64 Bits
Status:               	Not Subscribed

# subscription-manager release --list
5.6
5.7
5.8
5Server

# subscription-manager release --list --proxy REDHAT:PORT --proxyuser SHADOW --proxypassword MAN
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.

> Moving bug to verified state

Comment 5 errata-xmlrpc 2013-01-08 03:55:17 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-0033.html


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