PilotStatusAgent

The Pilot Status Agent updates the status of the pilot jobs if the PilotAgents database.

class DIRAC.WorkloadManagementSystem.Agent.PilotStatusAgent.PilotStatusAgent(agentName, loadName, baseAgentName=False, properties={})

Bases: DIRAC.Core.Base.AgentModule.AgentModule

The specific agents must provide the following methods:
  • initialize() for initial settings
  • beginExecution()
  • execute() - the main method called in the agent cycle
  • endExecution()
  • finalize() - the graceful exit of the method, this one is usually used
    for the agent restart
accountPilots(pilotsToAccount, connection)

account for pilots

am_Enabled()
am_checkStopAgentFile()
am_createStopAgentFile()
am_disableMonitoring()
am_getBasePath()
am_getControlDirectory()
am_getCyclesDone()
am_getMaxCycles()
am_getModuleParam(optionName)
am_getOption(optionName, defaultValue=None)
am_getPollingTime()
am_getShifterProxyLocation()
am_getStopAgentFile()
am_getWatchdogTime()
am_getWorkDirectory()
am_go()
am_initialize(*initArgs)
am_monitoringEnabled()
am_removeStopAgentFile()
am_secureCall(functor, args=(), name=False)
am_setModuleParam(optionName, value)
am_setOption(optionName, value)
am_stopExecution()
beginExecution()
clearParentJob(pRef, pDict, connection)

Clear the parameteric parent job from the PilotAgentsDB

clearWaitingPilots(condDict)

Clear pilots in the faulty Waiting state

eligibleGridTypes = ['gLite']
endExecution()
execute()

The PilotAgent execution method.

finalStateList = ['Done', 'Aborted', 'Cleared', 'Deleted', 'Failed']
finalize()
getPilotStatus(proxy, gridType, pilotRefList)

Get GRID job status information using the job’s owner proxy and GRID job IDs. Returns for each JobID its status in the GRID WMS and its destination CE as a tuple of 2 elements

handleOldPilots(connection)

select all pilots that have not been updated in the last N days and declared them Deleted, accounting for them.

identityFieldsList = ['OwnerDN', 'OwnerGroup', 'GridType', 'Broker']
initialize()

Sets defaults

queryStateList = ['Ready', 'Submitted', 'Running', 'Waiting', 'Scheduled']