RucioSynchronizerAgent

mod:

RucioSynchronizer

Agent that synchronizes Rucio and Dirac

The following options can be set for the RucioSynchronizerAgent.

RucioSynchronizerAgent options
RucioSynchronizerAgent
{
  #Time between cycles in seconds
  PollingTime = 120
}
class DIRAC.ConfigurationSystem.Agent.RucioSynchronizerAgent.RucioSynchronizerAgent(agentName, loadName, baseAgentName=False, properties={})

Bases: AgentModule

class RucioSynchronizerAgent

Agent that synchronizes Dirac users and SEs to Rucio.

__init__(agentName, loadName, baseAgentName=False, properties={})

Common __init__ method for all Agents. All Agent modules must define: __doc__

They are used to populate __codeProperties

The following Options are used from the Configuration: - /DIRAC/Setup - Status - Enabled - PollingTime default = 120 - MaxCycles default = 500 - WatchdogTime default = 0 (disabled) - ControlDirectory control/SystemName/AgentName - WorkDirectory work/SystemName/AgentName - shifterProxy ‘’ - shifterProxyLocation WorkDirectory/SystemName/AgentName/.shifterCred

It defines the following default Options that can be set via Configuration (above): - MonitoringEnabled True - Enabled True if Status == Active - PollingTime 120 - MaxCycles 500 - ControlDirectory control/SystemName/AgentName - WorkDirectory work/SystemName/AgentName - shifterProxy False - shifterProxyLocation work/SystemName/AgentName/.shifterCred

different defaults can be set in the initialize() method of the Agent using am_setOption()

In order to get a shifter proxy in the environment during the execute() the configuration Option ‘shifterProxy’ must be set, a default may be given in the initialize() method.

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

Create RSEs in Rucio based on information in Dirac CS.

Returns:

S_OK if all vital VO specific synchronisation succeeded, otherwise S_ERROR

Return type:

dict

executeForVO(vo)

Execute one SE and user synchronisation cycle for a VO.

Parameters:

vo (str) – Virtual organisation name.

Returns:

S_OK or S_ERROR

Return type:

dict

finalize()
initialize()

agent’s initialisation

Parameters:

self – self reference

DIRAC.ConfigurationSystem.Agent.RucioSynchronizerAgent.configHelper(voList)

A helper function to gather necessary Rucio client options from the CS.

Parameters:

volist – list of VO names, or a VO name (str)

Returns:

a dictionary of a form {vo: params, vo: params,}

Return type:

dict

DIRAC.ConfigurationSystem.Agent.RucioSynchronizerAgent.getStorageElements(vo)

Get configuration of storage elements

Parameters:

vo – VO name that an SE supports

Returns:

S_OK/S_ERROR, Value dictionary with key SE and value protocol list