Bug 1001842

Summary: yum-rhn-plugin doesn't respect httpProxy settings in up2date configuration file
Product: [Community] Spacewalk Reporter: Carl Thompson <fedora>
Component: ClientsAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED WORKSFORME QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.7   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-17 16:02:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1484117    

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.