Bug 678266 - urlgrabber doesn't support ftp proxy
urlgrabber doesn't support ftp proxy
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum (Show other bugs)
All Linux
unspecified Severity low
: rc
: ---
Assigned To: packaging-team-maint
BaseOS QE Security Team
Depends On:
  Show dependency treegraph
Reported: 2011-02-17 05:59 EST by Thomas Sondag
Modified: 2014-01-21 01:20 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-03-14 15:30:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Thomas Sondag 2011-02-17 05:59:13 EST
Description of problem:
We are using a real FTP proxy not http to ftp proxy, and that's not supported by python urlgrabber and python urllib2 and therefore yum.

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

How reproducible:
setup a ftp proxy in your environment and use for example spacewalk-repo-sync (every sync command will failed)

Steps to Reproduce:
1.export ftp_proxy=ftp://myproxy:21
2.spacewalk-repo-sync --url=ftp://whatever/some/where my_channel

Actual results:

Traceback (most recent call last):
  File "/usr/bin/spacewalk-repo-sync", line 72, in ?
    sys.exit(abs(main() or 0))
  File "/usr/bin/spacewalk-repo-sync", line 66, in main
  File "/usr/share/rhn/satellite_tools/reposync.py", line 103, in main
    self.import_packages(plugin, url)
  File "/usr/share/rhn/satellite_tools/reposync.py", line 135, in import_packages
    packages = plug.list_packages()
  File "/usr/share/rhn/satellite_tools/repo_plugins/yum_src.py", line 57, in list_packages
    sack.populate(repo, 'metadata', None, 0)
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 168, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 226, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1233, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1406, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1402, in _getRepoXML
    raise Errors.RepoError, msg
yum.Errors.RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: test-epel-i386-server-5. Please verify its path and try again

Expected results:
correct synchro or a clean error message

Additional info:

A ftp proxy is working that way in command line :
$ ftp my.proxy
ftp-prompt> anonymous@the.real.ftp
Password: ******

I manage to hack urllib2.py and byterange.py to make it work, but that's really too dirty, I'll like to a have a real fix.

Comment 1 James Antill 2013-03-14 15:30:27 EDT
This is probably fixed in RHEL-6 due to use of curl for downloads.

This request was evaluated by Red Hat Engineering for inclusion in a Red 
Hat Enterprise Linux maintenance release.

Red Hat does not currently plan to provide this change in a Red Hat 
Enterprise Linux update release for currently deployed products.

With the goal of minimizing risk of change for deployed systems, and in 
response to customer and partner requirements, Red Hat takes a 
conservative approach when evaluating enhancements for inclusion in 
maintenance updates for currently deployed products. The primary 
objectives of update releases are to enable new hardware platform 
support and to resolve critical defects.

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