[Buildbot-commits] [Buildbot] #2056: builders sometimes stay in an idle, plus 1 state

Buildbot nobody at buildbot.net
Sat Jul 30 23:44:17 UTC 2011


#2056: builders sometimes stay in an idle, plus 1 state
--------------------+---------------------
Reporter:  dwlocks  |       Owner:
    Type:  defect   |      Status:  new
Priority:  major    |   Milestone:  0.10.+
 Version:  0.8.4p2  |  Resolution:
Keywords:           |
--------------------+---------------------
Changes (by dustin):

 * keywords:  database =>
 * milestone:  0.8.5 => 0.10.+


Comment:

 That should be {{{canStartBuild}}}.  I think I can see what would cause
 exactly what you're seeing.

 Zmanda's {{{canStartBuild}}} looks at the total number of slaves running
 builds on each VM node; if N slaves on the node are running builds, then
 the N+1th slave returns False from {{{canStartBuild}}}.  However, when
 each of those N slaves finish their build, they call
 {{{maybeStartBuildsForSlave(slavename)}}} with their own name.  This
 function tries to start a build for each of the builders connected to that
 slave.  If the N+1th slave is not connected to any of those builders, then
 it will not get a chance to run.

 Once things are in this state, {{{maybeStartBuildsForAllBuilders}}} will
 start builds up to the configured N, but if more than N builds remain to
 be scheduled, then you'll see the "random assortment" you mention.
 However, calling {{{maybeStartBuildsForSlave("slavename")}}} for a "stuck"
 slave will unwedge it (assuming that fewer than N builds are running on
 that VM node).

 Dan, for you, the fix is to override the slave's {{{buildFinished}}}
 method, which you'll see in the parent class calling
 {{{maybeStartBuildsForSlave}}}.  Instead, in your subclass, call
 {{{maybeStartBuildsForAllBuilders}}}.  If you're feeling adventurous, you
 could just call {{{maybeStartBuildsForSlave}}} for every slave on the
 current slave's VM node.

 A general fix for this will wait until APIs are defined in 0.10.x.

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2056#comment:6>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list