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 664548 - subscription-manager refresh appears to ignore command line proxy options
Summary: subscription-manager refresh appears to ignore command line proxy options
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.1
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Adrian Likins
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: Entitlement-Beta
TreeView+ depends on / blocked
 
Reported: 2010-12-20 18:36 UTC by John Sefler
Modified: 2011-05-19 13:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 13:38:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0611 0 normal SHIPPED_LIVE new package: subscription-manager 2011-05-18 17:56:21 UTC

Description John Sefler 2010-12-20 18:36:58 UTC
Description of problem:
While testing the proxy command line options, the refresh module seems to ignore the values set on the command line in favor of what is set in rhsm.conf.

Proxy option set on the command line should override what is set in rhsm.conf.


Version-Release number of selected component (if applicable):
[root@jsefler-onprem02 ~]# rpm -q subscription-manager
subscription-manager-0.93.5-1.el6.x86_64


How reproducible:


Steps to Reproduce:
[root@jsefler-onprem02 ~]# vi /etc/rhsm/rhsm.conf
SET THE PROXY PARAMETERS IN rhsm.conf TO AN INVALID VALUE AS SHOWN...

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

[root@jsefler-onprem02 ~]# subscription-manager register --username=testuser1 --password=password --proxy=auto-services.usersys.redhat.com:3128 --proxyuser=redhat --proxypassword=redhat
39e9650e-926f-4d1b-b625-b41c0465560e testuser1

[root@jsefler-onprem02 ~]# subscription-manager refresh --proxy=auto-services.usersys.redhat.com:3128 --proxyuser=redhat --proxypassword=redhatNetwork error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.

^^^^ IN THIS LAST COMMAND, THE VALID COMMAND LINE PROXY OPTIONS SHOULD OVERRIDE WHAT IS SET IN THE rhsm.conf  (NOTE: THE CALL TO THE register MODULE PROPERLY ACCEPTED THE PROXY OPTIONS)

Comment 2 Adrian Likins 2011-01-04 15:47:00 UTC
commit a5b32253ed40b7a292c89dfa42f382fd4e762856
Author: Adrian Likins <alikins>
Date:   Tue Jan 4 10:01:10 2011 -0500

    664548: Fix for some subcommands (refresh ) not using proxy info as well
    
    Move where we create the cp/uep object for cli modules. Also gets
    rid of half a dozen unneeded uep creations on cli startup.

Comment 3 John Sefler 2011-01-05 22:48:21 UTC
[root@jsefler-onprem01 ~]# rpm -q subscription-manager
subscription-manager-0.93.9-1.git.12.e79dad8.el6.x86_64

[root@jsefler-onprem01 ~]# vi /etc/rhsm/rhsm.conf
SET THE PROXY PARAMETERS IN rhsm.conf TO AN INVALID VALUE AS SHOWN...
[root@jsefler-onprem01 ~]# grep proxy /etc/rhsm/rhsm.conf
# an http proxy server to use
proxy_hostname = XXXX
# port for http proxy server
proxy_port = 00000
# user name for authenticating to an http proxy, if needed
proxy_user = YYYY
# password for basic http proxy auth, if needed
proxy_password = ZZZZ

[root@jsefler-onprem01 ~]# subscription-manager register --username=testuser1 --password=password --proxy=auto-services.usersys.redhat.com:3128 --proxyuser=redhat --proxypassword=redhat
709247c0-02a0-46c1-91e8-f9bcea81f942 testuser1

[root@jsefler-onprem01 ~]# subscription-manager refresh --proxy=auto-services.usersys.redhat.com:3128 --proxyuser=redhat --proxypassword=redhat
All local data refreshed

^^ DEFECT VERIFIED (THE COMMAND LINE PROXY OPTIONS OVERRODE THOSE IN rhsm.conf)

[root@jsefler-onprem01 ~]# subscription-manager refresh
Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.

^^ Network error occurred as expected due to bad proy settings in rhsm.conf

moving to VERIFIED

Comment 4 errata-xmlrpc 2011-05-19 13:38:19 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0611.html


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