[Buildbot-devel] Setting a buildslave's active status

Lieven Govaerts lgo at mobsol.be
Tue Jun 6 21:20:56 UTC 2006

> -----Original Message-----
> From: Brian Warner [mailto:warner-buildbot at lothar.com] 
> Sent: zaterdag 3 juni 2006 20:10
> anyways, good idea.. let's figure out how to implement this.


thanks for your detailed answer. You seem to have added some extra features
to the list, so let's first summarize the feature-list:

#1: Only run builds on a buildslave during out-of-office hours, which should
be defined by the buildslave owner. 
#2: Graceful shutdown of a buildslave on request of the buildslave owner
#3: Graceful shutdown of a buildmaster on request of the buildmaster owner
#4: Manually pause a buildslave (keep running but don't accept builds)
#5: Reload configuration when the builders are ready(not building). Can be
limited to the builders whose configuration changes.
#6: Give information to the buildslave owner, like the status (active,
building) and ...(?)

My request in my original email is feature #1, but I'm equally interested in
#2, #3 and #5. 

In terms of implementation, features #1, #4 and #5 are all dependent on #2
and/or #3. 

In fact, when we're able to graceful shutdown a buildslave, we can implement
feature #1 with a cron job like you suggest. Which I think is even a better
solution then to implement it in buildbot itself!

Since I neither have time nor interest in implementing all these features,
I'd like to concentrate now on feature #2 and later #3. Remarks?

Feature #2: Graceful shutdown of a buildslave on request of the buildslave
Detail: graceful shutdown of a buildslave happens when the buildbot process
is stopped right after the last local build is finished. This can be
triggered by the buildslave owner manually, or scheduled through a cron job.

Suggested UI: buildbot stop --graceful ./slavedir

Implementation (high level):
- parse the --graceful option.
- add a function waitUntilIdle that returns a Deferred
- setup a Deferred, that fires when no builds are active. Question: do we
know in the buildslave when a build is completely finished? Or do we only
see the individual steps here?
- set the internal status to NOT_ACCEPTING_NEW_BUILDS and (if needed)
communicate that to the buildmaster

This is just high level, I didn't dive in the buildslave code yet, that's
for tomorrow.



More information about the devel mailing list