SystemAdministratorHandler

SystemAdministrator service is a tool to control and monitor the DIRAC services and agents

class DIRAC.FrameworkSystem.Service.SystemAdministratorHandler.SystemAdministratorHandler(handlerInitDict, trid)

Bases: DIRAC.Core.DISET.RequestHandler.RequestHandler

exception ConnectionError(msg)

Bases: exceptions.Exception

__init__(msg)

x.__init__(…) initializes x; see help(type(x)) for signature

args
message
__init__(handlerInitDict, trid)

Constructor

Parameters:
  • handlerInitDict (dictionary) – Information vars for the service
  • trid (object) – Transport to use
auth_ping = ['all']
export_addDatabaseOptionsToCS(system, database, overwrite=False)

Add the section with the database options to the CS

export_addDefaultOptionsToCS(componentType, system, component, overwrite=False)

Add default component options to the global CS or to the local options

export_addDefaultOptionsToComponentCfg(componentType, system, component)

Add default component options local component cfg

export_addOptionToDiracCfg(option, value)

Set option in the local configuration file

export_checkComponentLog(component)

Check component log for errors

static export_echo(data)

This method used for testing the performance of a service

export_executeCommand(command)

Execute a command locally and return its output

export_getAvailableDatabases()

Get the list of databases which software is installed in the system

export_getComponentDocumentation(cType, system, module)
export_getDatabases(mysqlPassword=None)

Get the list of installed databases

export_getHostInfo()

Retrieve host parameters

export_getInfo()

Get versions of the installed DIRAC software and extensions, setup of the local installation

export_getInstalledComponents()

Get the list of all the components ( services and agents ) installed on the system in the runit directory

export_getLogTail(system, component, length=100)

Get the tail of the component log file

export_getMySQLStatus()

Get the status of the MySQL database installation

export_getOverallStatus()

Get the complete status information for the components in the given list

export_getProject()
export_getSetupComponents()

Get the list of all the components ( services and agents ) set up for running with runsvdir in /opt/dirac/startup directory

export_getSoftwareComponents()

Get the list of all the components ( services and agents ) for which the software is installed on the system

export_getStartupComponentStatus(componentTupleList)

Get the list of all the components ( services and agents ) set up for running with runsvdir in startup directory

export_getUsedPorts()

Retrieve the ports in use by services on this host :return: Returns a dictionary containing, for each system, which port is being used by which service

export_installComponent(componentType, system, component, componentModule='')

Install runit directory for the specified component

export_installDatabase(dbName, mysqlPassword=None)

Install a DIRAC database named dbName

export_installMySQL(mysqlPassword=None, diracPassword=None)

Install MySQL database server

export_ping()
export_restartComponent(system, component)

Restart the specified component, running with the runsv daemon

export_revertSoftware()

Revert the last installed version of software to the previous one

export_setProject(projectName)
export_setupComponent(componentType, system, component, componentModule='')

Setup the specified component for running with the runsvdir daemon It implies installComponent

export_startComponent(system, component)

Start the specified component, running with the runsv daemon

export_stopComponent(system, component)

Stop the specified component, running with the runsv daemon

export_uninstallComponent(system, component, removeLogs)

Remove runit directory for the specified component It implies unsetupComponent

export_uninstallDatabase(dbName, mysqlPassword=None)

Uninstall a DIRAC database named dbName

export_unsetupComponent(system, component)

Removed the specified component from running with the runsvdir daemon

export_updateSoftware(version, rootPath='', gridVersion='')

Update the local DIRAC software installation to version

classmethod getCSOption(optionName, defaultValue=False)

Get an option from the CS section of the services

Returns:Value for serviceSection/optionName in the CS being defaultValue the default
getRemoteAddress()

Get the address of the remote peer.

Returns:Address of remote peer.
getRemoteCredentials()

Get the credentials of the remote peer.

Returns:Credentials dictionary of remote peer.
initialize()

Initialize this instance of the handler (to be overwritten)

classmethod initializeHandler(serviceInfo)

Handler class initialization

srv_disconnect(trid=None)
classmethod srv_disconnectClient(trid)
srv_getActionTuple()
classmethod srv_getCSOption(optionName, defaultValue=False)

Get an option from the CS section of the services

Returns:Value for serviceSection/optionName in the CS being defaultValue the default
srv_getClientSetup()
srv_getClientVO()
srv_getFormattedRemoteCredentials()
classmethod srv_getMonitor()
srv_getRemoteAddress()

Get the address of the remote peer.

Returns:Address of remote peer.
srv_getRemoteCredentials()

Get the credentials of the remote peer.

Returns:Credentials dictionary of remote peer.
classmethod srv_getServiceName()
srv_getTransportID()
classmethod srv_getURL()
classmethod srv_msgCreate(msgName)
srv_msgReply(msgObj)
classmethod srv_msgSend(trid, msgObj)
transfer_bulkFromClient(bulkId, token, bulkSize, fileHelper)
transfer_bulkToClient(bulkId, token, fileHelper)
transfer_fromClient(fileId, token, fileSize, fileHelper)
transfer_listBulk(bulkId, token, fileHelper)
transfer_toClient(fileId, token, fileHelper)
types_addDatabaseOptionsToCS = [<type 'basestring'>, <type 'basestring'>]
types_addDefaultOptionsToCS = [<type 'basestring'>, <type 'basestring'>, <type 'basestring'>]
types_addDefaultOptionsToComponentCfg = [<type 'basestring'>, <type 'basestring'>]
types_addOptionToDiracCfg = [<type 'basestring'>, <type 'basestring'>]
types_checkComponentLog = [[<type 'basestring'>, <type 'list'>]]
types_echo = [<type 'basestring'>]
types_executeCommand = [<type 'basestring'>]
types_getAvailableDatabases = []
types_getComponentDocumentation = [<type 'basestring'>, <type 'basestring'>, <type 'basestring'>]
types_getDatabases = []
types_getHostInfo = []
types_getInfo = []
types_getInstalledComponents = []
types_getLogTail = [<type 'basestring'>, <type 'basestring'>]
types_getMySQLStatus = []
types_getOverallStatus = []
types_getProject = []
types_getSetupComponents = []
types_getSoftwareComponents = []
types_getStartupComponentStatus = [<type 'list'>]
types_getUsedPorts = []
types_installComponent = [<type 'basestring'>, <type 'basestring'>, <type 'basestring'>]
types_installDatabase = [<type 'basestring'>]
types_installMySQL = []
types_ping = []
types_restartComponent = [<type 'basestring'>, <type 'basestring'>]
types_revertSoftware = []
types_setProject = [<type 'basestring'>]
types_setupComponent = [<type 'basestring'>, <type 'basestring'>, <type 'basestring'>]
types_startComponent = [<type 'basestring'>, <type 'basestring'>]
types_stopComponent = [<type 'basestring'>, <type 'basestring'>]
types_uninstallComponent = [<type 'basestring'>, <type 'basestring'>, <type 'bool'>]
types_uninstallDatabase = [<type 'basestring'>]
types_unsetupComponent = [<type 'basestring'>, <type 'basestring'>]
types_updateSoftware = [<type 'basestring'>]
DIRAC.FrameworkSystem.Service.SystemAdministratorHandler.loadDIRACCFG()