[Buildbot-devel] 'latent' build host on network power switch
andy at gamubaru.com
Mon Oct 15 03:20:50 UTC 2012
I have a host thats only used once in awhile. Most of the time it functions more as a
heater and noise maker than anything else.
The machine is connected to a networked power switch. I've got a python class to turn the
power on and off.
I'm implementing a subclass of AbstractLatentBuildSlave to control it. The basic idea is
when start_instance is called, I check with the switch to make sure its turned on and ping
the host to check that its up. If its not powered up, I power it up and wait until I can
I haven't quite worked out the shutdown aspect of it. I guess I'll have servlet on the
slave that stop_instance can poke when it wants to shut it down. I'll likely have a
mechanism for manual override, so that I can keep the slave up if needed.
I'm working on a unit test for it now, though it slow going trying to wrap me head around
testing deferreds and catching exceptions.
I used ec2buildslave as my template, though maybe I should have used libvirtbuildslave
instead. ec2buildslave uses deferToThread to bring up the machine.
Does this seem like a reasonable approach?
More information about the devel