Closed Bug 870061 Opened 8 years ago Closed 6 years ago

Add report of running builds on a per-slave basis to buildapi


(Release Engineering :: General, defect)

Not set


(Not tracked)



(Reporter: jhopkins, Unassigned)



buildapi doesn't support reporting running builds on a per-slave basis.

For example:

This returns 0 records even when a build is running on that machine.

We could make use of this feature in kittenherder so it can double-check that a build slave is not running a build before doing a reboot.  That would guard against this scenario:
- slave is idle for 6 hours (the threshold for kittenherder to take action)
- slave starts a build
- kittenherder checks the slave but cannot SSH in to look at the twistd.log timestamps
- kittenherder assumes the slave needs a reboot and uses PDU or IPMI to reset it.
- this kills the build in progress
Unfortunately the buildbot scheduler db doesn't record which slave is running a job, so we don't have a way to do this cheaply. You can get the master that claimed a buildrequest, but have to hit the web ui on that master to figure out which slave is doing it. 

At which point you're probably better parsing pages like that
But sometimes the master gets confused and that will tell you lies, and it can be slow to load if the master is busy.
Is there a way we can coerce the scheduler DB to know the slavename relatively cheaply?
302 Dustin.
If it's not in there, it's not in there :)

You can, of course, hack the code to put it in there..
Adding a buildslave field is part of the planned 'nine' release of buildbot:
Product: → Release Engineering
Found in triage.

aiui, the buildapi would first need the data to be stored in the scheduler db... a feature upcoming in buildbot0.9?
Component: Other → Tools
Yes, in Buildbot nine there is a buildslave associated with each build in the Buildbot database.
Closed: 6 years ago
QA Contact: hwine
Resolution: --- → WONTFIX
Component: Tools → General
You need to log in before you can comment on or make changes to this bug.