Bug 833390 - subscription-manager release --list ignores command line proxy options
subscription-manager release --list ignores command line proxy options
Status: CLOSED ERRATA
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: Michael Stead
Entitlement Bugs
: ZStream
Depends On: 824530
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-19 07:42 EDT by RHEL Product and Program Management
Modified: 2012-07-13 00:35 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-13 00:35:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description RHEL Product and Program Management 2012-06-19 07:42:58 EDT
This bug has been copied from bug #824530 and has been proposed
to be backported to 6.3 z-stream (EUS).
Comment 4 Michael Stead 2012-06-19 10:19:25 EDT
fixed in: RHEL6.3.z d2deced0bb879046150999578b02dfe03ce6d4c3
Comment 6 John Sefler 2012-06-29 10:09:51 EDT
DEMONSTRATION OF FAILURE WITHOUT FIX APPLIED....

[root@rhsm-compat-rhel63 ~]# rpm -q subscription-manager
subscription-manager-0.99.19.3-1.el6_3.x86_64

[root@rhsm-compat-rhel63 ~]# 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@rhsm-compat-rhel63 ~]# subscription-manager config --server.hostname subscription.rhn.stage.redhat.com

[root@rhsm-compat-rhel63 ~]# subscription-manager register --autosubscribe --username stage_test_12
Password: 
The system has been registered with id: c7a77771-0037-4513-bc4f-5798685bd219 
Installed Product Current Status:
Product Name:         	Red Hat Enterprise Linux Server
Status:               	Subscribed               

[root@rhsm-compat-rhel63 ~]# subscription-manager release --list
6.1
6.2
6.3
6Server

[root@rhsm-compat-rhel63 ~]# subscription-manager release --list --proxy REDHAT:PORT --proxyuser SHADOW --proxypassword MAN
6.1
6.2
6.3
6Server
^^^^^^^  DID NOT EXPECT THIS LIST SINCE THE PROXY ARGUMENTS PASSED ON THE COMMAND LINE (REDHAT:PORT SHADOW MAN) WERE INVALID.  EXPECTED TO GET: 
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
Comment 7 John Sefler 2012-06-29 10:52:54 EDT
VERIFICATION WITH FIXED PACKAGE INSTALLED...

[root@rhsm-compat-rhel63 ~]# rpm -q subscription-managersubscription-manager-0.99.19.4-1.el6_3.x86_64

[root@rhsm-compat-rhel63 ~]# 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 EXPECTED RESULT WHEN INVALID COMMAND LINE PROXY ARGS ARE SPECIFIED.

NOW, LET'S VERIFY WITH VALID COMMAND LINE PROXY ARGS...

[root@rhsm-compat-rhel63 ~]# subscription-manager release --list --proxy auto-services.usersys.redhat.com:3128 --proxyuser redhat --proxypassword ***
6.1
6.2
6.3
6Server

[root@auto-services ~]# tail -f /var/log/squid/access.log
1340997632.274    862 10.16.120.159 TCP_MISS/200 4114 CONNECT cdn.redhat.com:443 redhat DIRECT/184.26.128.251 -

^^^ VERIFIED THAT WHEN VALID COMMAND LINE PROXY ARGS ARE SPECIFIED
TRAFFIC FLOWS THROUGH THE PROXY AND THE EXPECTED RESULTS ARE RETURNED.

NOW, LET'S VERIFY WHEN VALID PROXY ARGS ARE SPECIFIED VIA THE rhsm.conf FILE...

[root@rhsm-compat-rhel63 ~]# subscription-manager config --server.proxy_hostname=auto-services.usersys.redhat.com --server.proxy_port=3128 --server.proxy_user=redhat --server.proxy_password=***

[root@rhsm-compat-rhel63 ~]# subscription-manager release --list
6.1
6.2
6.3
6Server

[root@auto-services ~]# tail -f /var/log/squid/access.log
1340998420.168    779 10.16.120.159 TCP_MISS/200 4114 CONNECT cdn.redhat.com:443 redhat DIRECT/184.26.128.251 -

^^^ VERIFIED THAT TRAFFIC FLOWS THROUGH THE PROXY WHEN VALID PROXY CREDENTIALS ARE CONFIGURED IN THE rhsm.conf.

NOW, LET'S VERIFY THAT A WHEN A BOGUS PROXY IS SPECIFIED ON THE COMMAND LINE, IT WILL TAKE PRECEDENCE OVER THE VALID PROXY CONFIGURED IN rhsm.conf...

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

^^^ VERIFIED

Moving bug status to VERIFIED
Comment 9 errata-xmlrpc 2012-07-13 00:35:15 EDT
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-2012-1073.html

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