PATCH: plague-0.5.0: PackageJob.py: NameError _and_ YumBaseError (unable to kill its job)

Joe Todaro jstodaro at us.ibm.com
Sat Nov 18 03:43:00 UTC 2006


Dan Williams wrote on 11/13/2006 03:26:58 PM:

> On Sun, 2006-11-05 at 23:48 -0500, Joe Todaro wrote:
> > 
> > ---- PROBLEM # 1 ----  Depsolve step keeps crashing due to a typo in
> > the script: 
> > 
> > 364 (fuse-sshfs): Starting depsolve for arches: ['x86_64', 'i386']. 
> > Exception in thread PackageJob: 364/fuse-sshfs: 
> > [...snip...] 
> > >   File "/usr/share/plague/server/PackageJob.py", line 513, in 
> > > _arch_deps_solved 
> > >     base.log = logger.Logger(threshold=threshold,
> > file_object=sys.stdout) 
> > > NameError: global name 'logger' is not defined 
> 
> Fixed, thanks!

My pleasure - glad to help.

> 
> > 
> > ---- PROBLEM # 2 ---- Unable to kill any job that fails due to a
> > missing package/s in the yum repos: 
> > 
> > >   File "/usr/share/plague/server/PackageJob.py", line 548, in
> > _arch_deps_solved 
> > >    pkg = base.returnPackageByDep(dep) 
> > >   File "__init__.py", line 1342, in returnPackageByDep 
> > > YumBaseError: No Package found for fuse-devel 
> 
> What version of yum do you have on this machine? 

yum-2.4.2-2

> The versions of the
> yum python libraries are a bit confusing here; and that's probably where
> the error is coming from.  It appears that an unexpected error is
> getting thrown, and we need to catch that error.  However, I'm not sure
> where exactly it's coming from to catch it.  Can you try to get this
> error again and then paste in about 10 lines of code from around the
> Line # in PackageJob.py that this backtrace comes from? (ie, line 548
> here), and mark the line numbers too?

    537             try:
    538                 base.doSackSetup(archlist)
    539             except yum.Errors.RepoError, exc:
    540                 raise DepError(str(exc))
    541
    542             for dep in srpm.requiresList():
    543                 if dep.startswith("rpmlib("):
    544                     continue
    545                 if use_repomd:
    546                     try:
    547                         pkg = base.returnPackageByDep(dep)
    548                     except repomd.mdErrors.PackageSackError, exc:
    549                         raise DepError(str(exc))
    550                 else:
    551                     try:
    552                         pkg = base.returnPackageByDep(dep)
    553                     except yum.Errors.PackageSackError, exc:
    554                         raise DepError(str(exc))
    555                     except yum.Errors.YumBaseError, exc:
    556                         raise DepError(str(exc))
    557         except DepError, exc:
    558             self._last_depsolve_error = str(exc)
    559             print "%s (%s/%s): Depsolve Error: %s" % (self.uid, 
self.package, arch, str(exc))
    560             success = False

> 
> The fix you posted for this hunk isn't the "correct" fix; 

Actually, it wasn't intended to "fix" the (YumBaseError) problem 
itself -- rather it was just intended to provide us with a means by 
which we'd be able to "recover* from the negative effects of the 
problem, which was a plague-server that wouldn't allow us to *kill* 
the associated buildjob because the buildjob wasn't in "waiting" 
state -- it was in "depsolve" which is where it got stuck. Anyway, 
recycling the plague-server did not help -- it just kept restarting 
the buildjob which just kept failing in the same place even after we
downloaded the missing package (fuse-devel) to the yum repo and ran
the createrepo command in-between plague-server restarts. 

> that would be
> to catch the exception and to re-throw it as a DepSolveError as is done
> for the other 'execpt' blocks around there.
> 
> Cheers,
> Dan
> 
> > 
> > ---- PATCH ---- 
> > 
> > Here's the patch that resolved the above 2 problems for us: 
> > 
> > 
> > 
> > ----- REQUEST ---- 
> > 
> > Can someone please review it... especially the fix to PROBLEM # 2,
> > that could potentially be masking a bigger problem.. 
> > 
> > Here's the code for your convenience (...these are the updates we made
> > to the _latest_ version of PackageJob.py): 
> > 
> > $ cd /usr/share/plague/server 
> > $ diff PackageJob.py PackageJob.py.working 
> > 513c513 
> > <                 base.log = logger.Logger(threshold=threshold,
> > file_object=sys.stdout) 
> > --- 
> > >                 base.log = Logger(threshold=threshold,
> > file_object=sys.stdout) 
> > 698c698 
> > <         if self._curstage == 'waiting': 
> > --- 
> > >         if self._curstage in ['waiting', 'depsolve']: 
> > 
> > 
> > Thanks, 
> >   Joe
> > --
> > Fedora-buildsys-list mailing list
> > Fedora-buildsys-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/fedora-buildsys-list
> 
> --
> Fedora-buildsys-list mailing list
> Fedora-buildsys-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-buildsys-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-buildsys-list/attachments/20061117/5c2c9cc7/attachment.htm>


More information about the Fedora-buildsys-list mailing list