[Buildbot-devel] Latent Slave code changes
exarkun at twistedmatrix.com
exarkun at twistedmatrix.com
Tue May 11 16:30:05 UTC 2010
On 02:20 pm, johnmcarr at me.com wrote:
>
>On Tuesday, May 11, 2010, at 12:37AM, <exarkun at twistedmatrix.com>
>wrote:
>>On 9 May, 09:15 pm, johnmcarr at me.com wrote:
>>>Hi guys,
>>>
>>>I'd like to make some changes to latent slaves to better support
>>>starting virtual machines on demand. A working prototype of the
>>>changes
>>>i'd like to make are here, but i'd like to clarify a few things. I
>>>dont
>>>expect that this is ready to land.
>>
>>I haven't looked at your code, so sorry if the answer to this question
>>would have been obvious otherwise. But. Why isn't it sufficient to
>>have the Deferred returned from start_instance (which already supports
>>Deferred return values) just fire later, when some previous VMs have
>>been shut down?
>>
>>Jean-Paul
>
>start_instance does indeed return a Deferred, and whenever i have said
>"make start_instance return true or false", what i actually mean is
>return a Deferred that calls back with True or False. This allows the
>scheduler a chance to find another slave (it should be possible to
>control multiple VM hosts with this code), rather than effectively
>blocking until a slot is available - and with how the code is currently
>structured, that is really what you are proposing.
>
>start_instance currently fires its callback when a latent slave has
>started and attached - this is quite neat and i have no intention to
>change that. What my change does is add a code path where it can return
>early and say "Nope, you cant use this slave after all" without it
>being an error condition. The scheduler kicks in and can assign this to
>other slaves. I should add that error conditions in start_instance
>currently disable the latent slave all together, which is not
>desirable.
Ah, I see. Thanks for the clarification.
Jean-Paul
More information about the devel
mailing list