[Buildbot-devel] getting buildslaves to exit after one build?
Dan Kegel
dank at kegel.com
Tue Aug 28 14:12:05 UTC 2012
On Mon, Aug 27, 2012 at 10:01 PM, Tom Prince <tom.prince at ualberta.net> wrote:
>> def _release_slave(res, slave, bs):
>> self.slavebuilder.buildFinished()
>> slave.updateSlaveStatus(buildFinished=bs)
>> + if (slave.properties.getProperty('oneshot', False)):
>> + log.msg("Shutting down oneshot slave!")
>> + slave.shutdown()
>> return res
>> d.addCallback(_release_slave, self.slavebuilder.slave, build_status)
>
> Well, if that is all you need to shutdown the instance, then
> def stop_instance(self, fast=False):
> self.shutdown()
> would seem to do what you need (in a latent slave).
As I explained at the start of the thread, I think need to use plain old slaves.
Latent slaves run on the master, and use libvirt to set up slaves, but
libvirt's lxc support seems iffy.
I could hack something together based on abstract latent build slaves,
but my two-line hack seems sufficient. Is there something particularly
bad about it?
In particular, what about the race listed in
http://trac.buildbot.net/ticket/1001
?
- Dan
More information about the devel
mailing list