ElementInspectorAgent

ElementInspectorAgent

This agent inspect Resources (or maybe Nodes), and evaluates policies that apply.

The following options can be set for the ElementInspectorAgent.

ElementInspectorAgent options
ElementInspectorAgent
{
  #Time between cycles in seconds
  PollingTime = 300

  #Maximum number of threads used by the agent
  maxNumberOfThreads = 15

  #Type of element that this agent will run on (Resource or Site)
  elementType = Resource
}
class DIRAC.ResourceStatusSystem.Agent.ElementInspectorAgent.ElementInspectorAgent(*args, **kwargs)

Bases: AgentModule

The ElementInspector agent is a generic agent used to check the elements of type “Resource” – which includes ComputingElement, StorageElement, and other types

This Agent takes care of the Elements. In order to do so, it gathers the eligible ones and then evaluates their statuses with the PEP.

__init__(*args, **kwargs)

c’tor

am_Enabled()
am_checkStopAgentFile()
am_createStopAgentFile()
am_getControlDirectory()
am_getCyclesDone()
am_getMaxCycles()
am_getModuleParam(optionName)
am_getOption(optionName, defaultValue=None)

Gets an option from the agent’s configuration section. The section will be a subsection of the /Systems section in the CS.

am_getPollingTime()
am_getShifterProxyLocation()
am_getStopAgentFile()
am_getWatchdogTime()
am_getWorkDirectory()
am_go()
am_initialize(*initArgs)

Common initialization for all the agents.

This is executed every time an agent (re)starts. This is called by the AgentReactor, should not be overridden.

am_removeStopAgentFile()
am_secureCall(functor, args=(), name=False)
am_setModuleParam(optionName, value)
am_setOption(optionName, value)
am_stopExecution()
beginExecution()
endExecution()
execute()

This is the main method of the agent. It gets the elements from the Database which are eligible to be re-checked.

Gets all the rows in the <self.elementType>Status table, and then discards entries with TokenOwner != rs_svc. On top of that, there are check frequencies that are applied: depending on the current status of the element, they will be checked more or less often.

finalize()

graceful finalization

initialize()

Standard initialize.