<br><tt><font size=2>Dan Williams wrote on 11/13/2006 03:26:58 PM:<br>
<br>
> On Sun, 2006-11-05 at 23:48 -0500, Joe Todaro wrote:<br>
> > <br>
> > ---- PROBLEM # 1 ---- Depsolve step keeps crashing due
to a typo in<br>
> > the script: <br>
> > <br>
> > 364 (fuse-sshfs): Starting depsolve for arches: ['x86_64', 'i386'].
<br>
> > Exception in thread PackageJob: 364/fuse-sshfs: <br>
> > [...snip...] <br>
> > > File "/usr/share/plague/server/PackageJob.py",
line 513, in <br>
> > > _arch_deps_solved <br>
> > > base.log = logger.Logger(threshold=threshold,<br>
> > file_object=sys.stdout) <br>
> > > NameError: global name 'logger' is not defined <br>
> <br>
> Fixed, thanks!</font></tt>
<br>
<br><tt><font size=2>My pleasure - glad to help.</font></tt>
<br><tt><font size=2><br>
> <br>
> > <br>
> > ---- PROBLEM # 2 ---- Unable to kill any job that fails due to
a<br>
> > missing package/s in the yum repos: <br>
> > <br>
> > > File "/usr/share/plague/server/PackageJob.py",
line 548, in<br>
> > _arch_deps_solved <br>
> > > pkg = base.returnPackageByDep(dep) <br>
> > > File "__init__.py", line 1342, in returnPackageByDep
<br>
> > > YumBaseError: No Package found for fuse-devel <br>
> <br>
> What version of yum do you have on this machine? </font></tt>
<br>
<br><tt><font size=2>yum-2.4.2-2</font></tt>
<br>
<br><tt><font size=2>> The versions of the<br>
> yum python libraries are a bit confusing here; and that's probably
where<br>
> the error is coming from. It appears that an unexpected error
is<br>
> getting thrown, and we need to catch that error. However, I'm
not sure<br>
> where exactly it's coming from to catch it. Can you try to get
this<br>
> error again and then paste in about 10 lines of code from around the<br>
> Line # in PackageJob.py that this backtrace comes from? (ie, line
548<br>
> here), and mark the line numbers too?</font></tt>
<br>
<br><tt><font size=2> 537
try:</font></tt>
<br><tt><font size=2> 538
base.doSackSetup(archlist)</font></tt>
<br><tt><font size=2> 539
except yum.Errors.RepoError, exc:</font></tt>
<br><tt><font size=2> 540
raise DepError(str(exc))</font></tt>
<br><tt><font size=2> 541</font></tt>
<br><tt><font size=2> 542
for dep in srpm.requiresList():</font></tt>
<br><tt><font size=2> 543
if dep.startswith("rpmlib("):</font></tt>
<br><tt><font size=2> 544
continue</font></tt>
<br><tt><font size=2> 545
if use_repomd:</font></tt>
<br><tt><font size=2> 546
try:</font></tt>
<br><tt><font size=2> 547
pkg = base.returnPackageByDep(dep)</font></tt>
<br><tt><font size=2> 548
except repomd.mdErrors.PackageSackError,
exc:</font></tt>
<br><tt><font size=2> 549
raise DepError(str(exc))</font></tt>
<br><tt><font size=2> 550
else:</font></tt>
<br><tt><font size=2> 551
try:</font></tt>
<br><tt><font size=2> 552
pkg = base.returnPackageByDep(dep)</font></tt>
<br><tt><font size=2> 553
except yum.Errors.PackageSackError,
exc:</font></tt>
<br><tt><font size=2> 554
raise DepError(str(exc))</font></tt>
<br><tt><font size=2> 555
except yum.Errors.YumBaseError, exc:</font></tt>
<br><tt><font size=2> 556
raise DepError(str(exc))</font></tt>
<br><tt><font size=2> 557 except
DepError, exc:</font></tt>
<br><tt><font size=2> 558
self._last_depsolve_error = str(exc)</font></tt>
<br><tt><font size=2> 559
print "%s (%s/%s): Depsolve Error: %s" % (self.uid, self.package,
arch, str(exc))</font></tt>
<br><tt><font size=2> 560
success = False</font></tt>
<br><tt><font size=2><br>
> <br>
> The fix you posted for this hunk isn't the "correct" fix;
</font></tt>
<br>
<br><tt><font size=2>Actually, it wasn't intended to "fix" the
(YumBaseError) problem </font></tt>
<br><tt><font size=2>itself -- rather it was just intended to provide us
with a means by </font></tt>
<br><tt><font size=2>which we'd be able to "recover* from the negative
effects of the </font></tt>
<br><tt><font size=2>problem, which was a plague-server that wouldn't allow
us to *kill* </font></tt>
<br><tt><font size=2>the associated buildjob because the buildjob wasn't
in "waiting" </font></tt>
<br><tt><font size=2>state -- it was in "depsolve" which is where
it got stuck. Anyway, </font></tt>
<br><tt><font size=2>recycling the plague-server did not help -- it just
kept restarting </font></tt>
<br><tt><font size=2>the buildjob which just kept failing in the same place
even after we</font></tt>
<br><tt><font size=2>downloaded the missing package (fuse-devel) to the
yum repo and ran</font></tt>
<br><tt><font size=2>the createrepo command in-between plague-server restarts.
</font></tt>
<br>
<br><tt><font size=2>> that would be<br>
> to catch the exception and to re-throw it as a DepSolveError as is
done<br>
> for the other 'execpt' blocks around there.<br>
> <br>
> Cheers,<br>
> Dan<br>
> <br>
> > <br>
> > ---- PATCH ---- <br>
> > <br>
> > Here's the patch that resolved the above 2 problems for us: <br>
> > <br>
> > <br>
> > <br>
> > ----- REQUEST ---- <br>
> > <br>
> > Can someone please review it... especially the fix to PROBLEM
# 2,<br>
> > that could potentially be masking a bigger problem.. <br>
> > <br>
> > Here's the code for your convenience (...these are the updates
we made<br>
> > to the _latest_ version of PackageJob.py): <br>
> > <br>
> > $ cd /usr/share/plague/server <br>
> > $ diff PackageJob.py PackageJob.py.working <br>
> > 513c513 <br>
> > <
base.log = logger.Logger(threshold=threshold,<br>
> > file_object=sys.stdout) <br>
> > --- <br>
> > >
base.log = Logger(threshold=threshold,<br>
> > file_object=sys.stdout) <br>
> > 698c698 <br>
> > < if self._curstage == 'waiting':
<br>
> > --- <br>
> > > if self._curstage in ['waiting',
'depsolve']: <br>
> > <br>
> > <br>
> > Thanks, <br>
> > Joe<br>
> > --<br>
> > Fedora-buildsys-list mailing list<br>
> > Fedora-buildsys-list@redhat.com<br>
> > https://www.redhat.com/mailman/listinfo/fedora-buildsys-list<br>
> <br>
> --<br>
> Fedora-buildsys-list mailing list<br>
> Fedora-buildsys-list@redhat.com<br>
> https://www.redhat.com/mailman/listinfo/fedora-buildsys-list<br>
</font></tt>