RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 824530 - subscription-manager release --list ignores command line proxy options
Summary: subscription-manager release --list ignores command line proxy options
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.3
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Adrian Likins
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 771481 833146 833390
TreeView+ depends on / blocked
 
Reported: 2012-05-23 16:50 UTC by John Sefler
Modified: 2013-01-09 17:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 833146 (view as bug list)
Environment:
Last Closed: 2013-01-09 17:45:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2012-05-23 16:50:59 UTC
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 13:38:37 UTC
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 4 Sharath Dwaral 2012-06-21 17:04:43 UTC
> Please ignore the comment was working on a similar bug on 5.9

Comment 6 John Sefler 2012-11-17 19:22:41 UTC
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 17:45:22 UTC
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.