Bug 1001842 - yum-rhn-plugin doesn't respect httpProxy settings in up2date configuration file
Summary: yum-rhn-plugin doesn't respect httpProxy settings in up2date configuration file
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 1.7
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space27
TreeView+ depends on / blocked
 
Reported: 2013-08-27 23:14 UTC by Carl Thompson
Modified: 2017-09-28 18:09 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-17 16:02:54 UTC
Embargoed:


Attachments (Terms of Use)

Description Carl Thompson 2013-08-27 23:14:19 UTC
Description of problem:
yum-rhn-plugin does not observe the define httpProxy in update configuration file on centos/rhel 5 release (works on rhel 6)


Version-Release number of selected component (if applicable):
1.7 of spacewalk client tools
centos/rhel 5


How reproducible:
every time


Steps to Reproduce:
1. configure a centos/rhel 5 system register/use spacewalk 1.7
2. configure up2date configuration file for use of an httpProxy
3. attempt to run yum update

Actual results:
strace shows that it is attempting to connect to the ip resolving for the serverURL and not use the proxy server


Expected results:
yum update (utilizing yum-rhn-plugin) would use the defined proxy to connect to spacewalk


Additional info:
in the rhnplugin.py file it is passing HTTPS and HTTP to grabber.py in python.  If you modify rhnplugin.py to pass https and http respectfully then everything works.

if you apply the following patch it works for both rhel/centos 5 and rhel/centos 6:


--- rhnplugin.py	2013-08-27 23:12:08.000000000 +0000
+++ rhnplugin.new	2013-08-27 23:12:28.000000000 +0000
@@ -76,9 +76,9 @@
         proxy_url = get_proxy_url(up2date_cfg)
         if proxy_url:
             if up2date_cfg['useNoSSLForPackages']:
-                proxy_dict = {'HTTP' : proxy_url}
+                proxy_dict = {'http' : proxy_url}
             else:
-                proxy_dict = {'HTTPS' : proxy_url}
+                proxy_dict = {'https' : proxy_url}
     except BadProxyConfig:
         rhn_enabled = False
         PROXY_ERROR =  _("There was an error parsing the RHN proxy settings.")

Comment 1 Milan Zázrivec 2014-01-17 16:02:54 UTC
I set the following two config options:

    enableProxy
    httpProxy

in /etc/sysconfig/rhn/up2date and with rhn-client-tools-2.1.14-1.el5
I can confirm that the yum operations operate via the configured proxy
just fine.

Closing with worksforme.

Comment 2 Eric Herget 2017-09-28 18:09:28 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.


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