[Buildbot-devel] Builders that use latent slaves start in a state "building"
Mantas Mikaitis
Mantas.Mikaitis at arm.com
Thu Apr 16 13:57:24 UTC 2015
Hi Pierre and thank you for your answer,
I will be glad to file a ticket about this.
However, I looked a bit at the internal code concerning the slave
start-up and I see something interesting:
buildbot/process/builder.py:
def _startBuildFor(self, slavebuilder, buildrequests):
...
...
# append the build to self.building
self.building.append(build)
cleanups.append(lambda: self.building.remove(build))
# update the big status accordingly
self.updateBigStatus()
try:
ready = yield slavebuilder.prepare(self.builder_status, build)
except:
log.err(failure.Failure(), 'while preparing slavebuilder:')
ready = False
# If prepare returns True then it is ready and we start a build
# If it returns false then we don't start a new build.
if not ready:
log.msg("slave %s can't build %s after all; re-queueing the "
"request" % (build, slavebuilder))
run_cleanups()
defer.returnValue(False)
return
It looks as though we are adding a build into self.building before even
looking at the slave?
Regards,
Mantas M.
On 16/04/15 14:40, Pierre Tardy wrote:
>
> It is a complication on how the latent build slave was patched in.
> There is no state recorded that the build request is claimed but
> waiting for a latent slave. Build is not yet created at that time.
> Creating one is a possibility. In case of latent slave start failure
> we ll have to mark it RETRY.
>
> You may want to file a bug and if you are brave enough start working
> on it! The brd is a complex subsystem but very interesting to work on.
> You ll have to work on nine though add this is too intrusive feature
> for eight.
>
>
> Le jeu. 16 avr. 2015 06:16, Mantas Mikaitis <Mantas.Mikaitis at arm.com
> <mailto:Mantas.Mikaitis at arm.com>> a écrit :
>
> Hello,
>
> To explain the problem in simpler terms I will give an example:
>
> *Current state*:
> A builder is offline.
> A latent slave that is attached to above builder is offline.
>
> *Scenario*:
> Build request comes in.
> Builder starts latent slave, removes request from "Pending" list
> and changes it's state to "building".
> Latent slave is still connecting.
> Connecting...
> 2minutes later it connects and the build appears in the waterfall.
>
> Is this functionality intended that while the latent is slave is
> connecting the build request is not in the "Pending" list and not
> in the JSON API list of builds and additionally a builder is
> marked "building" even though it is not technically building while
> the slave is preparing.
>
> Does anyone have any ideas about this issue?
>
> Kind regards,
> Mantas M.
>
>
> On 15/04/15 10:11, Mantas Mikaitis wrote:
>> Hi,
>>
>> I am using latent slaves on my Buildbot configuration and inside
>> LatentSlave object I have start_instance that returns a deferred which
>> calls back only when the slave is ready to build.
>>
>> However when a builder chooses above kind of slave using
>> nextSlave=choose_slave the status goes to yellow and it says "building"
>> but no build appears due to the fact that the LatentSlave is still
>> trying to connect (The time between calling start_instance and the slave
>> connecting is around 1min normally). Additionally the new build is also
>> removed from "Pending builds" list.
>>
>> Anyone could point me to the right direction how to make my builds
>> "pending" while the LatentSlave is connecting instead of being in an
>> undefined (Not pending and not in the waterfall) state while the slave
>> connects?
>>
>> Thank you,
>> Mantas M.
>>
>>
>> ------------------------------------------------------------------------------
>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>> Develop your own process in accordance with the BPMN 2 standard
>> Learn Process modeling best practices with Bonita BPM through live exercises
>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>> _______________________________________________
>> Buildbot-devel mailing list
>> Buildbot-devel at lists.sourceforge.net <mailto:Buildbot-devel at lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>>
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live
> exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual-
> event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF_______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> <mailto:Buildbot-devel at lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20150416/c2d941b7/attachment.html>
More information about the devel
mailing list