tardis.adapters.batchsystems.htcondor module

class tardis.adapters.batchsystems.htcondor.HTCondorAdapter[source]

Bases: tardis.interfaces.batchsystemadapter.BatchSystemAdapter

HTCondorAdapter implements the TARDIS interface to dynamically integrate and manage opportunistic resources with the HTCondor Batch System.

async disintegrate_machine(drone_uuid: str) None[source]

HTCondor does not require any specific disintegration procedure.

Parameters

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

Returns

None

async drain_machine(drone_uuid: str) None[source]

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

Parameters

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

Returns

None

async get_allocation(drone_uuid: str) float[source]

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

Parameters

drone_uuid (str) – 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.

Return type

float

async get_machine_status(drone_uuid: str) tardis.interfaces.batchsystemadapter.MachineStatus[source]

Get the status of a worker node in HTCondor (Available, Draining, Drained, NotAvailable)

Parameters

drone_uuid (str) – 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)

Return type

MachineStatus

async get_resource_ratios(drone_uuid: str) Iterable[float][source]

Get the ratio of requested over total resources (CPU, Memory, Disk, etc.) for a worker node in HTCondor according to the HTCondor expressions defined in the adapter configuration.

Parameters

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

Returns

Iterable of float containing the ratios

Return type

Iterable[float]

async get_utilisation(drone_uuid: str) float[source]

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

Parameters

drone_uuid (str) – 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.

Return type

float

async integrate_machine(drone_uuid: str) None[source]

HTCondor does not require any specific integration procedure

Parameters

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

Returns

None

property machine_meta_data_translation_mapping: tardis.utilities.attributedict.AttributeDict

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

Returns

Machine meta data translation mapping

Return type

AttributeDict

async tardis.adapters.batchsystems.htcondor.htcondor_status_updater(options: tardis.utilities.attributedict.AttributeDict, attributes: tardis.utilities.attributedict.AttributeDict, executor: tardis.interfaces.executor.Executor) dict[source]

Helper function to call condor_status -af asynchronously and to translate the output into a dictionary

Parameters
  • options (AttributeDict) – Additional options for the condor_status call. For example {'pool': 'htcondor.example'} will be translated into condor_status -af ... -pool htcondor.example

  • attributes (AttributeDict) – Additional fields to add to output of the condor_status -af response.

Returns

Dictionary containing the output of the condor_status command

Return type

dict