#293: CmdError: No more mirrors to try
------------------------+---------------------------------------------------
Reporter: kparal | Owner: tflink
Type: defect | Status: assigned
Priority: major | Milestone: Hot issues
Component: production | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Comment (by tflink):
After talking to wwoods on IRC earlier today, I realized that I was on the
right track but pointing the finger at the wrong cause. Hopefully I didn't
confuse him too much :)
We always see this error when builds are passed in as accepted. The code
from depcheck_lib.py that handles accepted builds is:
{{{
#!python
if accepted:
# mash the accepted packages into a proto-updates repo
accdir = tempfile.mkdtemp(prefix='depcheck-accepted.')
for p in accepted:
os.symlink(os.path.realpath(p), os.path.join(accdir,
os.path.basename(p)))
do_mash(accdir, mash_arches)
accrepo = yum_repos.add_enable_repo('prev_accepted',['file://%s'
%
accdir])
yum_repos.pkgSack # initializes package sacks
prev_accepted = list(accrepo.sack)
os.system('/bin/rm -rf %s' % accdir)
}}}
The idea is that we are creating a separate repo to hold the accepted
builds so that they aren't run through depcheck again. By initializing the
pkgSack of the yum object used for depcheck, all of the accepted builds
are added as packages and the hope is that the extra repo can be deleted.
I did some hacking to output the accepted repo information right before we
attempt to resolve deps:
{{{
baseurl = file:///tmp/depcheck-accepted.ph9HZi
...
name = prev_accepted
pkgdir = /var/tmp/yum-root-PB_6nt/prev_accepted/packages
}}}
The prev_accepted repo still has a baseurl of the temp directory that
we're deleting.
The problem comes in when yum wants to resolve deps. As part of this
process, it goes through and re-populates the repository; re-reading all
of the repo dbs as it goes along. Since we delete the repo db associated
with the accepted package repository, yum can't read the file and throws
an exception saying that there are no more mirrors left.
As far as a fix is concerned, the easy way would be to just not delete the
accepted repo. I've tried this on a simple example job, and the "no more
mirrors error" went away; the depcheck test passed as expected. The hard
way would be to try making yum not look for the files when it repopulates
the repo for resolving dependencies.
Personally, I'm all for the easy way on this since it is a one line patch
and just means that we have to clean out the /tmp dir on our test hosts
more often.
--
Ticket URL: <
https://fedorahosted.org/autoqa/ticket/293#comment:3>
AutoQA <
http://autoqa.fedorahosted.org>
Automated QA project