[Buildbot-devel] Fwd: Re: How to detach a buildslave

Kay Hayen kay.hayen at gmail.com
Sat Jun 7 09:15:54 UTC 2014

Thanks Vasily and Bernhard,

so this is the relevant section for that file to exist:


Can also be passed directly to the BuildSlave constructor in 
buildbot.tac. If
set, it allows the buildslave to initiate a graceful shutdown, meaning 
that it
will ask the master to shut down the slave when the current build, if 
any, is

    Setting allow_shutdown tofilewill cause the buildslave to
    watchshutdown.stampin basedir for updates to its mtime. When the
    mtime changes, the slave will request a graceful shutdown from the
    master. The file does not need to exist prior to starting the slave.

    Setting allow_shutdown tosignalwill set up a SIGHUP handler to start
    a graceful shutdown. When the signal is received, the slave will
    request a graceful shutdown from the master.

    The default value isNone, in which case this feature will be disabled.

    Both master and slave must be at least version 0.8.3 for this
    feature to work.


So that's really nice. I am also going to use this, to make my laptop 
build slave detach itself when
on battery. The signal SIGHUP seems easiest for that, if it's a service, 
which tracks pid, the file is what I was using with success now. Great.

I now realize, reading those options, how the quickstart tutorial made 
me miss out on a lot of such options, that are offered at slave creation 
time. Also, assuming that inotify or something efficient does the 
watching, "file" could well be a default, right?

For the master, there is     gracefulShutdown = True now, but I didn't 
restart the master, as that's too invasive. Some tests are running 1-2 
hours, and they would have to be repeated. So i am only going to see 
that later.

What are people using to launch buildbots. Because I believe, they now 
stop. What I actually meant to have was buildbot to continue running, 
finishing existing jobs (shutdown), but then also be able to resume, 
from the web interface. I assume, my approach is wrong in that it is 
wasteful. Should I read on latent build slaves there, or what is the 
concept of this.


Am 06.06.2014 11:53, schrieb Vasily:
> Re-sending my answer via another account...
> Hi Kay,
> Without looking at the manual (since I'm posting that from my phone) I 
> cannot give the link, but if you give a look at the build slave manual 
> there's a possibility to configure it so it would watch for certain 
> file and shutdown gracefully (i.e. after current job is finished).
> Then you can write a batch file that starts buildslave and does 
> something like reboots the box, which would happen after the slave 
> quit. Now the only thing to do is to schedule some means to operate 
> that "shutdown request" file.
> Thanks,
> Vasily
> 06.06.2014 10:57 пользователь "Kay Hayen" <kay.hayen at gmail.com 
> <mailto:kay.hayen at gmail.com>> написал:
>     Hello,
>     is there any way to detach a build slave, i.e. to let it finish
>     current jobs, then exit.
>     The background is that I have a dual boot machine (Windows +
>     Linux), that is really powerful, and should carry the tests as
>     much as possible. Yet, when I mean to reboot it to Windows, I seem
>     to have to wait for Linux jobs to finish.
>     On an idea level, I would have an xmlrpc interface, that
>     influences the scheduling decisions on the master to not use that
>     slave.
>     Without that, I am just going to have "interrupted" test results.
>     Any idea, anything I am missing?
>     Yours,
>     Kay
>     ------------------------------------------------------------------------------
>     Learn Graph Databases - Download FREE O'Reilly Book
>     "Graph Databases" is the definitive new guide to graph databases
>     and their
>     applications. Written by three acclaimed leaders in the field,
>     this first edition is now available. Download your free book today!
>     http://p.sf.net/sfu/NeoTech
>     _______________________________________________
>     Buildbot-devel mailing list
>     Buildbot-devel at lists.sourceforge.net
>     <mailto:Buildbot-devel at lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/buildbot-devel

More information about the devel mailing list