[Buildbot-devel] Buildbot with virtual machines
Justin Mason
jm at jmason.org
Fri Aug 18 13:23:56 UTC 2006
Trevor Strohman writes:
> I am building a "virtual" build farm, where almost all of my target
> platforms are virtual machines running on the same hardware. I
> expect that eventually I will have 10 to 15 operating system images
> on a single dual processor machine (and perhaps more). This machine
> also needs to have enough spare capacity to run a few other low-load
> services.
>
> Because there are so many virtual machines, I don't want them all to
> run at the same time. Ideally, when a build is submitted, buildbot
> could launch some of the virtual machines, let them complete the
> build, then shut them down, then start a new batch of machines.
>
> Is this possible? I don't mind modifying some code since I'll be
> writing my own system if buildbot doesn't work for me.
What I used for a similar limitation (all on one machine, but not multiple
VMs in my configuration) was the use of a synchronisation lockfile for
UNIX IPC locking. Each slave would atomically attempt to lock the file;
if it failed, it'd randomly sleep until it got it. By using the UNIX
"kill -0" trick to determine if a process exists, stale locks were
avoidable.
The fact that you're using VMs makes that harder, though I suppose you
could use fcntl locking over NFS.
It would be fantastic if there was a way to do this built into Buildbot;
it's a pretty common configuration, I think.
--j.
More information about the devel
mailing list