tardis.agents.batchsystemagent module

class tardis.agents.batchsystemagent.BatchSystemAgent(batch_system_adapter: BatchSystemAdapter)[source]

Bases: BatchSystemAdapter

async disintegrate_machine(drone_uuid: str) None[source]

Disintegrate a machine from the overlay batch system.

Parameters

drone_uuid – Uuid of the worker node, for some sites corresponding to the host name of the drone.

async drain_machine(drone_uuid: str) None[source]

Drain a machine in the overlay batch system, which means that no new jobs will be accepted

Parameters

drone_uuid – Uuid of the worker node, for some sites corresponding to the host name of the drone.

async get_allocation(drone_uuid: str) float[source]

Get the allocation of a worker node in the overlay batch system, which is defined as maximum of the ratios of requested over total resources (CPU, Memory, Disk, etc.).

Parameters

drone_uuid – Uuid of the worker node, for some sites corresponding to the host name of the drone.

Returns

The allocation of a worker node as described above.

async get_machine_status(drone_uuid: str) MachineStatus[source]

Get the status of a worker node in the overlay batch system (Available, Draining, Drained, NotAvailable)

Parameters

drone_uuid – Uuid of the worker node, for some sites corresponding to the host name of the drone.

Returns

The machine status in HTCondor (Available, Draining, Drained, NotAvailable)

async get_utilisation(drone_uuid: str) float[source]

Get the utilisation of a worker node in the overlay batch system, which is defined as minimum of the ratios of requested over total resources (CPU, Memory, Disk, etc.).

Parameters

drone_uuid – Uuid of the worker node, for some sites corresponding to the host name of the drone.

Returns

The utilisation of a worker node as described above.

async integrate_machine(drone_uuid: str) None[source]

Integrate a machine into the overlay batch system.

Parameters

drone_uuid – Uuid of the worker node, for some sites corresponding to the host name of the drone.

property machine_meta_data_translation_mapping: AttributeDict

The machine meta data translation mapping is used to translate units of the machine meta data in TARDIS as expected by the overlay batch system.

Returns

machine meta data translation mapping