Bug 184326

Summary: Better handling of "no more mirrors to try"
Product: [Fedora] Fedora Reporter: Gabriel Ghita <gabbath>
Component: pirutAssignee: Jeremy Katz <katzj>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 5CC: fitzsim, katzj, nitind
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 1.0.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-12 18:44:06 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: 182226    

Description Gabriel Ghita 2006-03-07 23:23:34 UTC
Description of problem:
Crashed while updating

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

How reproducible:
on fc5est3: fresh install (with latest version of pirut and yum) then just run
pup from applications or kmenu and update... it crashes on download

Actual results:
"Exception occurred"
output from exception is below:

Component: Software Updater
Summary: TB1322b6e4 mirror.py:290:_get_mirror:IndexError: list index out of range

Traceback (most recent call last):
  File "/usr/sbin/pup", line 292, in _apply
    self.applyChanges(self.mainwin)
  File "/usr/lib/python2.4/site-packages/pirut/__init__.py", line 596, in
applyChanges
    dlpkgs = self.downloadPackages(mainwin)
  File "/usr/lib/python2.4/site-packages/pirut/__init__.py", line 348, in
downloadPackages
    probs = self.downloadPkgs(dlpkgs)
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 663, in downloadPkgs
    cache=repo.http_caching != 'none',
  File "/usr/lib/python2.4/site-packages/yum/repos.py", line 626, in get
    http_headers=headers,
  File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 414, in urlgrab
    return self._mirror_try(func, url, kw)
  File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 392, in
_mirror_try
    mirrorchoice = self._get_mirror(gr)
  File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 290, in
_get_mirror
    return gr.mirrors[gr._next]
IndexError: list index out of range

Local variables in innermost frame:
self: <urlgrabber.mirror.MGRandomOrder instance at 0xb185cf4c>
gr: <urlgrabber.mirror.GrabRequest instance at 0xb19bca8c>


Expected results:
normal update

Additional info:
i'm behind a nat and sometimes yum just won't open any mirrors.... but if i run
the command again it works just fine

Comment 1 David Timms 2006-03-08 14:31:26 UTC
I received a near similar exception from pup update, while it was downloading
packages (ie after the Apply button). There is a long list of lioor exceptions
in bugzilla, all seemed marked as fixed.

However, while I have updated (with pup) more recently (say 4 days ago Mar 5),
no updates show in /var/log/yum after Feb28. The pup ( 0.9.10.1 ) is old.
===
Component: Software Updater
Summary: TB1322b6e4 mirror.py:290:_get_mirror:IndexError: list index out of range

Traceback (most recent call last):
  File "/usr/sbin/pup", line 269, in _apply
    self.applyChanges(self.mainwin)
  File "/usr/lib/python2.4/site-packages/pirut/__init__.py", line 580, in
applyChanges
    dlpkgs = self.downloadPackages(mainwin)
  File "/usr/lib/python2.4/site-packages/pirut/__init__.py", line 334, in
downloadPackages
    probs = self.downloadPkgs(dlpkgs)
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 632, in downloadPkgs
    cache=repo.http_caching != 'none',
  File "/usr/lib/python2.4/site-packages/yum/repos.py", line 625, in get
    http_headers=headers,
  File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 414, in urlgrab
    return self._mirror_try(func, url, kw)
  File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 392, in
_mirror_try
    mirrorchoice = self._get_mirror(gr)
  File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 290, in
_get_mirror
    return gr.mirrors[gr._next]
IndexError: list index out of range

Local variables in innermost frame:
self: <urlgrabber.mirror.MGRandomOrder instance at 0xb190e8cc>
gr: <urlgrabber.mirror.GrabRequest instance at 0xb354560c>

Comment 2 Gabriel Ghita 2006-03-09 12:51:00 UTC
after pup crashed i tried updating via yum several times and saw it kept failing
to connect to some mirrors (again, because of my connection). as much as i
understand from the traceback, i'm guessing this is just pup's way of saying
"connection failed"/"no more mirrors to try"

Comment 3 Jeremy Katz 2006-03-09 15:59:39 UTC
At this point, I'll fix this for an FC5 update

Comment 4 Jeremy Katz 2006-04-12 16:51:23 UTC
Committed a fix to CVS, will be in when I build the update.

Comment 5 Jeremy Katz 2006-04-12 18:44:06 UTC
Pushed fix into the devel tree, will do an update in a week or so providing no
big problems come out with it.