[Buildbot-devel] Port reservation for functional testing

Georges Racinet gracinet at anybox.fr
Tue May 29 16:45:00 UTC 2012


On May 28, 2012, at 6:16 PM, Dustin J. Mitchell wrote:

> I would recommend implementing what you're calling #(n-1) through
> #(n+1) in a single step with a script that's smart enough to handle
> the various contingencies, rather than trying to fit that into
> Buildbot's step model.

Thanks for the advice, I''ll try that. I was seeing steps as a way to  
gain more flexibility and handle several server startups  
independently, but that's a bit prematurate for now and doesn't  
contradict having a robust turnkey solution for simpler cases.

>
> As for choosing ports, as long as you don't pick ports in the dynamic
> range (32768-65535), you should be safe from collisions.  If you'll
> have tests running in parallel (which is always fun with selenium!),
> then you could use some simple mechanism to "reserve" a port number,
> e.g., by creating /var/run/webapp/$port.port with O_EXCL|O_CREAT.

Well, in general I prefer re-using a robust working lock  
implementation rather than cooking my own, maybe that's just being  
lazy :-)

>
> You can add fanciness to this script to fix whatever common failure
> modes you find.
>
> Dustin





More information about the devel mailing list