[Buildbot-commits] [Buildbot] #1001: start_instance on a latent BuildSlave called before stop_instance finished
Buildbot
buildbot-devel at lists.sourceforge.net
Tue Oct 26 11:58:37 UTC 2010
#1001: start_instance on a latent BuildSlave called before stop_instance finished
--------------------+-------------------------------------------------------
Reporter: moschny | Owner:
Type: defect | Status: new
Priority: major | Milestone: 0.8.3
Version: master | Keywords: virtualization
--------------------+-------------------------------------------------------
Comment(by moschny):
We do not implement `maybeStartBuild`, maybe that could also be used to
solve our problem.
However, if we agree that for each Slave there should only one instance
running at a time, then isn't it a bug to call `start_instace()` before
`stop_instance()` has finished?
We work around this using code like this:
{{{
#!text/x-python
class ChrootSlave(AbstractLatentBuildSlave):
def __init__(self, *args, **kwargs):
# ...
self.mylock = defer.DeferredLock()
def start_instance(self):
d = self.mylock.acquire()
# ...
def stop_instance(self, fast=False):
# ...
def _destroyed(res):
return self.mylock.release()
d.addCallback(_destroyed)
def _releasedLock(res):
return True
d.addCallback(_releasedLock)
return d
}}}
--
Ticket URL: <http://buildbot.net/trac/ticket/1001#comment:5>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the Commits
mailing list