[Buildbot-devel] Buildbot with virtual machines

Trevor Strohman strohman at cs.umass.edu
Fri Aug 18 13:34:59 UTC 2006


On Aug 18, 2006, at 9:23 AM, Justin Mason wrote:

> 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. [...]
>
> 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.

This does seem like a workable solution, although there are two parts  
that don't seem perfect:

1) All the VMs have to be running at once.  If you assume that each  
of these machines has a virtual memory footprint of 512mb or so, I'll  
be using lots of swapfile (and the machines will swap badly when  
builds start).  I guess I could wrap the VM launch with a script that  
waits on a lock, which would keep this kind of load down.
2) I'd like to run more than one at a time, but not all of them.   
Separating the VMs into multiple lock "pools" would come close to  
solving this.

Thanks,

Trevor






More information about the devel mailing list