little Target Port / status problem

Joe Marcus Clarke marcus at marcuscom.com
Fri Sep 19 13:32:52 EDT 2008


On Tue, 2008-09-16 at 10:43 +0300, Ion-Mihai Tetcu wrote:
> On Mon, 15 Sep 2008 19:45:20 -0400
> Joe Marcus Clarke <marcus at marcuscom.com> wrote:
> 
> > On Mon, 2008-09-15 at 15:50 +0300, Ion-Mihai Tetcu wrote:
> > > Hi,
> > > 
> > > 
> > > Following my problem with memory-backed build dirs I stopped tinderd
> > > and after fixing it build a port by hand then run a 
> > > update build_ports_queue set status='ENQUEUED' where status='ERROR';
> > > then started tinderd.
> > > 
> > > Now I'm left with a little inconsistency in the data base and the
> > > webui shows during a port build:
> > > 
> > > Current
> > > Build 	Target Port 	Port 	Duration 	ETA
> > > 7-STABLE-FPT 	astro/nova
> > > boinc-setiathome-enhanced-5.27_3 	01:29 	N/A
> 
>  [ .. ]
> 
> > > So, among other thing I wonder if there shouldn't be a
> > > unique(build_id, user_id, port_directory, status) constrain; and
> > > perhaps tinderd should check the status on start or better when  a
> > > port from build_ports_queue finishes to build.
> > 
> > I'm looking at the tinderd code, and I don't see how this is possible
> > unless you were running three instances of tinderd.  Tinderd will pull
> > the first port in the queue whose status is ENQUEUED.  It will set the
> > status of that port to PROCESSING.  It will then build it, setting its
> > status to FAIL or SUCCESS.  Then it will take the next port in the
> > queue.
> 
> Well, I wasn't. And I didn't kill tinderd with -9 or anything, just via
> the rc script.
> 
> I think this is what happens (I just reproduce it on my tindy):
> - you have enqueued ports
> - you start tinderd
> - a port build starts
> - while a port is building you stop then start or restart tinderd
> - then tinderd tries to build the next ENQUEUED port (while there still
> is a build in progress) and of course it fails: it updates the status
> for the queued port to FAIL and tries the next one, etc.
> 
> To get over this you have to:
> - stop tinderd
> - wait for the on-going build to finish
> - reset all FAILED or PROCESSING port in the queue to ENQUEUED
> - start tinderd again

I'll see about fixing this in tinderd.

> 
> 
> Speaking of the rc script, two suggestions:
> 
> - repocopy tinderd.sh -> tidnerd to follow the current style (I'm
> installing it like this in the port)
> 
> - have a log and/or debug flag for it:
> 
> if checkyesno tinderd_debug
> then
>         command_args=" &"
> else
>         command_args=">/dev/null &"
> fi
> 
> With debug one gets some useful information about why it doesn't
> build anything.
> 
> 
> BTW, is there a way to have tinderbuild's messages when ports are being
> built by tinderd ?
> Things like:
> 
>  # ./tc tinderbuild -b 7-STABLE-FPT arabic/libitl -nullfs
> tinderbuild: Lock file /usr/local/tinderbox/builds/7-STABLE-FPT/lock exists; exiting. 
>  # ./tc tinderbuild -b 7-STABLE-FPT arabic/libitl -nullfs
> tinderbuild: creating makefile...
> tinderbuild: Creating build directory for 7-STABLE-FPT
> execute_hook: Running /home/itetcu/bin/mount_wrk.sh for preBuildExtract with environment "BUILD=7-STABLE-FPT DESTDIR=/usr/local/tinderbox/7-STABLE-FPT JAIL=7 PB=/usr/local/tinderbox" from /usr/local/tinderbox/scripts.
> umount: /usr/local/tinderbox/7-STABLE-FPT: not a file system root directory
> can't umount /usr/local/tinderbox/7-STABLE-FPT
> execute_hook: Failed to run /home/itetcu/bin/mount_wrk.sh, exited with 1.
> makeBuild: Terminating Build extraction since hook preBuildExtract failed.
> 
> are useful when debugging, especially for hooks. (One thing I never
> managed to do is have the output of 'sh -x /some/hook' while running
> from tinderd, but this may be a missing redirection on my part)

All of this should now be fixed/implemented in HEAD.  There is a new
TINDERD_LOGFILE config option (tc configTinderd -l FILE).  If this is
set, then you should get all the tinderbuild output.

Joe

-- 
PGP Key : http://www.marcuscom.com/pgp.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://marcuscom.com/pipermail/tinderbox-list/attachments/20080919/9558413a/attachment.bin>


More information about the tinderbox-list mailing list