[Buildbot-devel] Have 'nextSlave' to query lock status

Jared Grubb jared.grubb at gmail.com
Thu Mar 1 17:51:54 UTC 2012


I control my builds using master and slave locks, and have noticed this scenario:
* Slave A starts a build, grabs slave lock L for 30 mins
* Slave B is idle
* Change comes in and triggers a build (that requires lock L to run)
* New build gets assigned randomly to A
* New build blocks waiting for a lock, even though B could run right now

I'm considering writing a 'nextSlave' functor that will only return slaves that can get the lock now (tested via Lock.isAvailable I think). Will that work? 

It sounds like it will work, but I am concerned that, if all slaves fail the lock-test and nextSlave returns None, there is some corner case where nothing will trigger a new test later. What triggers these maybe-run-build checks? Is it pretty much any action like another build finishing? I've been trying to find this in the code and havent yet found it.

Jared



More information about the devel mailing list