After master created some tasks on a shared filesystem, slave must take and execute them.
slave/bin/task-taker
is used for that task:
$ [ -n "$BASS_ROOT" ] || BASS_ROOT=/path/to/bass BASS_RC=/path/to/rc $ $BASS_ROOT/slave/bin/task-taker
It is also expected to be run under some kind of supervisor. It saves lastnum file in current directory with the latest task’s counter value it processed.
You may run multiple task-takers
to run jobs in parallel.
task-taker
runs slave/bin/job-starter
on a taken
task.
job-starter
takes the task and checks does it
have appropriate architecture and probably optional hostname set. It
exits successfully if task is not for us. Another slave will take it
instead.
build/bin/mk-skelenv
creates the
skelenv in that temporary directory and installs
slave-base
package, that depends on various utilities needed
for running the testing steps.
tmux
instance.
tmux
is started in steps/ directory and
runs slave/bin/steps-runner
.
steps-runner
succeeds, then temporary directory is
removed. Otherwise tmux
is left running and waiting for
someone to attach it and press Enter. If no input happens for
$FAILED_JOB_WAITTIME
seconds (one hour be default), it exits
and removes the temporary directory.
What exactly does steps-runner
?
tai64n
utility, prepending the timestamps for each output
line. Its exitcode it saved in exitcode.txt. It is always run
in the code/ directory.
$LINE_TIMEOUT
(ten minutes by
default) seconds. If step is stuck (no output for that time), then
it is killed and timeout
is written to exitcode.txt.