Bug 678266 - urlgrabber doesn't support ftp proxy
Summary: urlgrabber doesn't support ftp proxy
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum
Version: 5.8
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-17 10:59 UTC by Thomas Sondag
Modified: 2014-01-21 06:20 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-14 19:30:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Thomas Sondag 2011-02-17 10:59:13 UTC
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):
python-urlgrabber-3.1.0-6.el5

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
    sync.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.ftp
Password: ******
ftp-prompt>

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.

Thanks,
  Thomas

Comment 1 James Antill 2013-03-14 19:30:27 UTC
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.