[Buildbot-devel] Buildbot locks and multiple project features not working

Kay Hayen kay.hayen at gmail.com
Tue Dec 10 07:06:45 UTC 2013


Hello Dustin,

in fact, I did reproduce it, when I added it back to use, and I probably 
was only confused, but it seems, there was also locks = [ heavy_lock ] 
applied to all builds, so none was performed.

I now applied it only to the ones that I want to not build in paralell 
on the same slave and then I get this in the build log:

2013-12-10 07:40:02+0100 [-] <Build reflected-python2.7>.buildException
2013-12-10 07:40:02+0100 [-] Unhandled Error
         Traceback (most recent call last):
           File 
"/opt/buildbot/sandbox/local/lib/python2.7/site-packages/Twisted-13.2.0-py2.7-linux-armv5tel.egg/twisted/internet/defer.py", 
line 490, in _startRunCallbacks
             self._runCallbacks()
           File 
"/opt/buildbot/sandbox/local/lib/python2.7/site-packages/Twisted-13.2.0-py2.7-linux-armv5tel.egg/twisted/internet/defer.py", 
line 577, in _runCallbacks
             current.result = callback(current.result, *args, **kw)
           File 
"/opt/buildbot/sandbox/local/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/process/build.py", 
line 406, in _stepDone
             return self.startNextStep()
           File 
"/opt/buildbot/sandbox/local/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/process/build.py", 
line 395, in startNextStep
             d = defer.maybeDeferred(s.startStep, self.remote)
         --- <exception caught here> ---
           File 
"/opt/buildbot/sandbox/local/lib/python2.7/site-packages/Twisted-13.2.0-py2.7-linux-armv5tel.egg/twisted/internet/defer.py", 
line 139, in maybeDeferred
             result = f(*args, **kw)
           File 
"/opt/buildbot/sandbox/local/lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/process/buildstep.py", 
line 528, in startStep
             for access in self.locks ]
         exceptions.AttributeError: SlaveLock instance has no attribute 
'lockid'


As you can see, I am on buildbot 0.8.8, and the way I create it is:

         ShellCommand(
            env={"PYTHON":python},
            command=command,
            locks = [] if not is_heavy else [ heavy_lock ]
         )

and it has been created lick this:

from buildbot.locks import SlaveLock
heavy_lock = SlaveLock("heavy")

The result in walterfall is a build exception when forcing it and status 
"not finished" in the build. And it says something like this:

2013-12-10 07:40:02+0100 [-]  <Build reflected-python2.7>: build finished
2013-12-10 07:40:02+0100 [-] releaseLocks(<BuildSlave 
'laptop-linux-slave'>): []

So, the multiple project feature is now working, but I still cannot use 
locks.

Yours,
Kay





More information about the devel mailing list