3.5.12. master

resource type: master
Attributes:
  • active (boolean) – true if the master is active

  • last_active (date) – time this master was last marked active

  • masterid (integer) – the ID of this master

  • name (string) – master name (in the form “hostname:basedir”)

This resource type describes buildmasters in the buildmaster cluster.

3.5.12.1. Update Methods

All update methods are available as attributes of master.data.updates.

class buildbot.data.masters.Master
masterActive(name, masterid)
Parameters:
  • name (unicode) – the name of this master (generally hostname:basedir)

  • masterid (integer) – this master’s master ID

Returns:

Deferred

Mark this master as still active. This method should be called at startup and at least once per minute. The master ID is acquired directly from the database early in the master startup process.

expireMasters()
Returns:

Deferred

Scan the database for masters that have not checked in for ten minutes. This method should be called about once per minute.

masterStopped(name, masterid)
Parameters:
  • name (unicode) – the name of this master

  • masterid (integer) – this master’s master ID

Returns:

Deferred

Mark this master as inactive. Masters should call this method before completing an expected shutdown, and on startup. This method will take care of deactivating or removing configuration resources like builders and schedulers as well as marking lost builds and build requests for retry.

3.5.12.2. Endpoints

path: /builders/{builderid_or_buildername}/masters
Path Keys:

builderid_or_buildername (number|string) – the ID or name of the builder

This path selects all masters supporting a given builder

GET
returns

collection of master

path: /builders/{builderid_or_buildername}/{masterid}
Path Keys:
  • builderid_or_buildername (number|string) – the ID or name of the builder

  • masterid (number) – the id of the master

This path selects a master by id filtered by given builderid

GET
returns

collection of master

path: /masters

This path selects all masters

GET
returns

collection of master

path: /masters/{masterid}
Path Keys:

masterid (number) – the id of the master

This path selects one master given its id

GET
returns

collection of master