← Back to team overview

launchpad-dev team mailing list archive

Re: tachandler error handling

 

On Friday 12 February 2010 03:08:09 Michael Hudson wrote:
> Jeroen Vermeulen wrote:
> > When I try to run certain tests, I get this error:
> >
> > TacException: Unable to start [...branch...]/daemons/buildd-slave.tac.
> > Check /var/tmp/buildd/build-slave.log.
> >
> > This exception is raised by TacTestSetup.setUp in
> > lib/canonical/launchpad/daemons/tachandler.py.  Right below that is
> > tearDown which deletes that very log file.  And then for good measure,
> > the tearDown in BuilddSlaveTestSetup removes the entire directory that
> > the log file is in.  Good show for not leaving garbage behind, but in
> > this case a damned nuisance!
> >
> > In my case, the trigger seems to be that the buildd-slave daemon is
> > already running.  Is there some way we can get this information out?
> >
> > For instance, in case of failure we could copy the log file to some
> > fixed place outside /var/tmp/buildd.  As long as it's always writing to
> > the same filename, at least the garbage will be limited to 1 file.
> 
> This area certainly completely sucks.  I'd say that you should wield an
> axe and clear it out, but I think unfortunately the (untested,
> untestable) lp-build code uses tachandler, so we have to tread carefully.
> 
> I hope I'm being overly paranoid here...

The buildd code is not completely untested; see lib/canonical/buildd/tests and 
lib/lp/so	yuz/doc/buildd-slave.txt

jtv, I would say that if it fails, don't clean up logs at all, then there's 
something to look at later.  No doubt it will get cleaned up on subsequent 
successful runs.  If you want to make this fix I'd be happy to review it.

Cheers
J



Follow ups

References