ElementInspectorAgent

ElementInspectorAgent

This agent inspect Resources, and evaluates policies that apply.

class DIRAC.ResourceStatusSystem.Agent.ElementInspectorAgent.ElementInspectorAgent(*args, **kwargs)

Bases: DIRAC.Core.Base.AgentModule.AgentModule

The ElementInspector agent is a generic agent used to check the elements of one of the elementTypes ( e.g. Site, Resource, Node ).

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.

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()
endExecution()
execute()

This is the main method of the agent. It gets the elements from the Database which are eligible to be re-checked, calculates how many threads should be started and spawns them. Each thread will get an element from the queue until it is empty. At the end, the method will join the queue such that the agent will not terminate a cycle until all elements have been processed.

finalize()
getElementsToBeChecked()

This method 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.

initialize()

Standard initialize.