Bug 824530 - subscription-manager release --list ignores command line proxy options
subscription-manager release --list ignores command line proxy options
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.3
Unspecified Unspecified
high Severity medium
: rc
: ---
Assigned To: Adrian Likins
Entitlement Bugs
: ZStream
Depends On:
Blocks: 771481 833146 833390
  Show dependency treegraph
 
Reported: 2012-05-23 12:50 EDT by John Sefler
Modified: 2013-01-09 12:45 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 833146 (view as bug list)
Environment:
Last Closed: 2013-01-09 12:45:22 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sefler 2012-05-23 12:50:59 EDT
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.
Comment 1 Adrian Likins 2012-06-14 09:38:37 EDT
commit eb1cfcd5c1f3d00b8cbd16e7f0499154fa4e5d28
Author: Adrian Likins <alikins@redhat.com>
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@redhat.com>
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 4 Sharath Dwaral 2012-06-21 13:04:43 EDT
> Please ignore the comment was working on a similar bug on 5.9
Comment 6 John Sefler 2012-11-17 14:22:41 EST
Verifying Version...
[root@jsefler-6 ~]# rpm -q subscription-manager
subscription-manager-1.1.9-1.el6.x86_64


[root@jsefler-6 ~]# 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 =

^ DEMONSTRATES THAT WE ARE NOT CONFIGURED TO USE A PROXY

[root@jsefler-6 ~]# subscription-manager register --serverurl subscription.rhn.stage.redhat.com:443/subscription --username stage_test_12 --auto-attach
Password: 
The system has been registered with id: 432488f5-b432-43b8-8ddf-fb6372146b63 
Installed Product Current Status:
Product Name:         	Red Hat Enterprise Linux Server
Status:               	Subscribed

[root@jsefler-6 ~]# subscription-manager release --list
+-------------------------------------------+
          Available Releases
+-------------------------------------------+
6.1
6.2
6.3
6Server

^^^^^ VERIFIED EXPECTED RESULTS WHEN *NOT* PASSING THROUGH A PROXY

[root@jsefler-6 ~]# 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.

^^^^^ VERIFIED THAT WE NOW ENCOUNTER A NETWORK ERROR WHEN SPECIFYING A BOGUS PROXY

[root@jsefler-6 ~]# subscription-manager release --list --proxy BOGUS:PORT
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.

^^^^^ VERIFIED AGAIN THAT WE NOW ENCOUNTER A NETWORK ERROR WHEN SPECIFYING A BOGUS PROXY

[root@jsefler-6 ~]# subscription-manager release --list --proxy auto-services.usersys.redhat.com:3129
+-------------------------------------------+
          Available Releases
+-------------------------------------------+
6.1
6.2
6.3
6Server

^^^^^ VERIFIED EXPECTED RESULTS WHEN PASSING THROUGH A VALID PROXY
Comment 7 Bryan Kearney 2013-01-09 12:45:22 EST
Batch change of verified bugs which must have missed making the errata.

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