SSHComputingElement

SSH (Virtual) Computing Element

For a given IP/host it will send jobs directly through ssh

Configuration Parameters

Configuration for the SSHComputingElement submission can be done via the configuration system.

BatchError:

Area where the job errors are stored. If not defined: SharedArea + ‘/data’ is used. If not absolute: SharedArea + path is used.

BatchOutput:

Area where the job outputs are stored. If not defined: SharedArea + ‘/data’ is used. If not absolute: SharedArea + path is used.

BatchSystem:

Underlying batch system that is going to be used to orchestrate executable files. The Batch System has to be remotely accessible. By default, the SSHComputingElement submits directly on the host via the Host class. Available batch systems are defined in BatchSystems.

ExecutableArea:

Area where the executable files are stored if necessary. If not defined: SharedArea + ‘/data’ is used. If not absolute: SharedArea + path is used.

SharedArea:

Area used to store executable/output/error files if they are not aready defined via BatchOutput, BatchError, InfoArea, ExecutableArea and/or WorkArea. The path should be absolute.

SSHHost:

SSH host name

SSHUser:

SSH user login

SSHPassword:

SSH password

SSHPort:

Port number if not standard

SSHKey:

Location of the ssh private key for no-password connection

SSHTunnel:

Gateway/jump host used to reach the final destination. Example:

gateway_host
gateway_host:port
Timeout:

Timeout for the SSH commands. Default is 120 seconds.

Code Documentation

class DIRAC.Resources.Computing.SSHComputingElement.SSHComputingElement(ceUniqueID)

Bases: ComputingElement

__init__(ceUniqueID)

Standard constructor.

available()

This method returns the number of available slots in the target CE. The CE instance polls for waiting and running jobs and compares to the limits in the CE parameters.

getCEStatus()

Method to return information on running and pending jobs.

getDescription()

Get CE description as a dictionary.

This is called by the JobAgent for the case of “inner” CEs.

getJobOutput(jobID, localDir=None)

Get the specified job standard output and error files. If the localDir is provided, the output is returned as file in this directory. Otherwise, the output is returned as strings.

getJobStatus(jobIDList)

Get the status information for the given list of jobs

initializeParameters()

Initialize the CE parameters after they are collected from various sources

isValid()

Check the sanity of the Computing Element definition

killJob(jobIDList)

Kill a bunch of jobs

loadBatchSystem(batchSystemName)

Instantiate object representing the backend batch system

Parameters:

batchSystemName (str) – name of the batch system

sendOutput(stdid, line)

Callback function such that the results from the CE may be returned.

setCPUTimeLeft(cpuTimeLeft=None)

Update the CPUTime parameter of the CE classAd, necessary for running in filling mode

setParameters(ceOptions)

Add parameters from the given dictionary overriding the previous values

Parameters:

ceOptions (dict) – CE parameters dictionary to update already defined ones

setProxy(proxy)

Set proxy for this instance

setToken(token)
shutdown()

Close the SSH connection (and its gateway), releasing the Paramiko Transport thread. Called when the CE is evicted/rebuilt by the QueueCECache.

submitJob(executableFile, proxy, numberOfJobs=1)

Method to submit job, should be overridden in sub-class.

writeProxyToFile(proxy)

CE helper function to write a CE proxy string to a file.