Bug 607408

Summary: cobbler does not use proxy environment settings when doing HTTP
Product: Red Hat Satellite 5 Reporter: Paul Wayper <paulway>
Component: ProvisioningAssignee: Justin Sherrill <jsherril>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: low    
Version: 530CC: cperry, mmello
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: 2010-07-13 04:03:00 UTC Type: ---
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: 462714    

Description Paul Wayper 2010-06-24 03:13:02 UTC
Description of problem:

When trying to download Cobbler loaders with 'cobbler get-loader', it attempts to access the URL http://mdehaan.fedorapeople.org/loaders/README directly and not using the standard 'http_proxy' environment variable.

Version-Release number of selected component (if applicable):

5.3.0

How reproducible:

Always

Steps to Reproduce:
1. Block direct access to the internet and use a proxy.
2. Set the http_proxy environment variable correctly.
3. Run 'cobbler get-loader'
  
Actual results:

[root@satellite cobbler]# cobbler get-loaders
task started: 2010-06-24_125343_get_loaders
task started (id=Download Bootloader Content, time=Thu Jun 24 12:53:43 2010)
downloading content required to netboot all arches
downloading http://mdehaan.fedorapeople.org/loaders/README to /var/lib/cobbler/loaders/README
Exception occured: urlgrabber.grabber.URLGrabError
Exception value: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Exception Info:
  File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 95, in run
    rc = self._run(self)
   File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 179, in runner
    return self.remote.api.dlcontent(self.options.get("force",False), self.logger)
   File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 581, in dlcontent
    return grabber.run(force)
   File "/usr/lib/python2.4/site-packages/cobbler/action_dlcontent.py", line 71, in run
    urlgrabber.urlgrab(src,dst)
   File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 602, in urlgrab
    return default_grabber.urlgrab(url, filename, **kwargs)
   File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 934, in urlgrab
    return self._retry(opts, retryfunc, url, filename)
   File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 852, in _retry
    r = apply(func, (opts,) + args, {})
   File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 920, in retryfunc
    fo = URLGrabberFileObject(url, filename, opts)
   File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1008, in __init__
    self._do_open()
   File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1091, in _do_open
    fo, hdr = self._make_request(req, opener)
   File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1220, in _make_request
    raise URLGrabError(4, _('IOError: %s') % (e, ))

!!! TASK FAILED !!!

Expected results:

[root@satellite cobbler]# cobbler get-loaders
task started: 2010-06-24_125343_get_loaders
task started (id=Download Bootloader Content, time=Thu Jun 24 12:53:43 2010)
downloading content required to netboot all arches
downloading http://mdehaan.fedorapeople.org/loaders/README to /var/lib/cobbler/loaders/README
[... some kind of success here ...]

Additional info:

I would have thought that urlgrabber obeyed proxy configuration - maybe this needs to be pushed upstream or a different web library used.

Comment 1 Jan Pazdziora 2010-06-24 07:52:41 UTC
Flipping to provisioning.

Comment 2 Clifford Perry 2010-06-28 14:50:18 UTC
hi there, 
Can you direct me to some satellite functionality that exposes this bug? 

Satellite only supports cobbler for the Satellite usage of cobbler and not for direct usage of cobbler outside of Satellite. So, either it is a documented (within Satellite docs usage of command line cobbler, or a bug that can be exposed by using Satellites interactions with cobbler). 

Otherwise, please report the bug upstream to cobbler project. 
 - https://fedorahosted.org/cobbler/wiki#Communicate

Regards,
Cliff.