# # $Id: srm.batch,v 1.35 2007-10-27 02:45:18 timur Exp $ # set printout default 2 set printout CellGlue none onerror shutdown # check -strong setupFile # copy file:${setupFile} context:setupContext # # import the variables into our $context. # don't overwrite already existing variables. # import context -c setupContext # # Make sure we got what we need. # check -strong serviceLocatorPort serviceLocatorHost check -strong srmPort # # create dmg.cells.services.RoutingManager RoutingMgr # # The LocationManager Part # create dmg.cells.services.LocationManager lm \ "${serviceLocatorHost} ${serviceLocatorPort}" # # # srm c e l l # # # Default values (it not specified in dCacheSetup # onerror continue set context -c srmVersion version1 set context -c srmDbHost localhost set context -c srmDatabaseHost ${srmDbHost} set context -c srmDbName dcache set context -c srmDbUser srmdcache set context -c srmDbPassword srmdcache set context -c srmPasswordFile "" set context -c useGPlazmaAuthorizationCell true set context -c delegateToGPlazma false set context -c useGPlazmaAuthorizationModule false set context -c gplazmaPolicy ${ourHomeDir}/etc/dcachesrm-gplazma.policy set context -c srmAuthzCacheLifetime 180 set context -c parallelStreams 10 set context -c srmTimeout 3600 set context -c srmVacuum true set context -c srmVacuumPeriod 21600 set context -c srmBufferSize 1048576 set context -c srmTcpBufferSize 1048576 set context -c srmDebug true set context -c srmGetReqThreadQueueSize 10000 set context -c srmGetReqThreadPoolSize 250 set context -c srmGetReqMaxWaitingRequests 1000 set context -c srmGetReqReadyQueueSize 10000 set context -c srmGetReqMaxReadyRequests 2000 set context -c srmGetReqMaxNumberOfRetries 10 set context -c srmGetReqRetryTimeout 60000 set context -c srmGetReqMaxNumOfRunningBySameOwner 100 set context -c srmPutReqThreadQueueSize 10000 set context -c srmPutReqThreadPoolSize 250 set context -c srmPutReqMaxWaitingRequests 1000 set context -c srmPutReqReadyQueueSize 10000 set context -c srmPutReqMaxReadyRequests 1000 set context -c srmPutReqMaxNumberOfRetries 10 set context -c srmPutReqRetryTimeout 60000 set context -c srmPutReqMaxNumOfRunningBySameOwner 100 set context -c srmCopyReqThreadQueueSize 10000 set context -c srmCopyReqThreadPoolSize 250 set context -c srmCopyReqMaxWaitingRequests 1000 set context -c srmCopyReqMaxNumberOfRetries 10 set context -c srmCopyReqRetryTimeout 60000 set context -c srmCopyReqMaxNumOfRunningBySameOwner 100 set context -c srmGetLifeTime 14400000 set context -c srmPutLifeTime 14400000 set context -c srmCopyLifeTime 14400000 set context -c srmVacuum true set context -c srmVacuumPeriod 21600 set context -c pnfsSrmPath / set context -c srmPoolManagerTimeout 300 set context -c srmPoolTimeout 300 set context -c srmPnfsTimeout 300 set context -c srmMoverTimeout 7200 set context -c remoteCopyMaxTransfers 150 set context -c remoteHttpMaxTransfers 30 set context -c remoteGsiftpMaxTransfers ${srmCopyReqThreadPoolSize} set context -c remoteGsiftpIoQueue "" set context -c srmDbLogEnabled false set context -c RecursiveDirectoryCreation true set context -c AdvisoryDelete true set context -c kpwdFile ${ourHomeDir}/etc/dcache.kpwd set context -c useLambdaStation false set context -c lsMapFile ${ourHomeDir}/lambdastation/config/l_station_map.xml set context -c lsScript ${ourHomeDir}/lambdastation/scripts/open_ls_ticket set context -c overwriteEnabled false set context -c srmOverwriteByDefault false # this is the directory in which the delegated user credentials will be stored # as files. We recommend set permissions to 700 on this dir set context -c srmUserCredentialsDirectory ${ourHomeDir}/credentials set context -c srmPnfsManager PnfsManager set context -c srmPoolManager PoolManager #login broker timeout in millis set context -c srmLoginBrokerUpdatePeriod 3000 #pool manager timeout in seconds set context -c srmPoolManagerTimeout 60 #number of doors in the random selection #srm will order doors according to their load #and select sertain number of the least loaded #and then randomly choose which one to use set context -c srmNumberOfDoorsInRandomSelection 5 #srm will hold srm requests and their history in database # for srmNumberOfDaysInDatabaseHistory days #after that they will be removed set context -c srmNumberOfDaysInDatabaseHistory 10 # how frequently to remove old requests from the database set context -c srmOldRequestRemovalPeriodSeconds 60 # srmJdbcMonitoringLogEnabled is set to true srm will store sufficient # information about srm requests and their execution history in database # for monitoring interface to work # if it is set to false, only the absiolutely necessary information will be stored set context -c srmJdbcMonitoringLogEnabled false #jdbc updates are now queued and their execution is #decoupled from the execution of the srm requests # the srmJdbcExecutionThreadNum controls the number of the threads #that will be dedicated to execution of these updates # and the srmMaxNumberOfJdbcTasksInQueue controls the maximum # length of the queue set context -c srmJdbcExecutionThreadNum 5 set context -c srmMaxNumberOfJdbcTasksInQueue 1000 # if space reservation request does not specify retention policy # we will assign this retention policy by default set context -c SpaceManagerDefaultRetentionPolicy CUSTODIAL # if space reservation request does not specify access latency # we will assign this access latency by default set context -c SpaceManagerDefaultAccessLatency NEARLINE #if the transfer request come from the door, and there was not prior # space reservation made for this file, should we try to reserve # space before satisfying the request set context -c SpaceManagerReserveSpaceForNonSRMTransfers false # # ---- Usage of Srm Space Manager # # If srmSpaceManagerEnabled is on we need to use SrmSpaceManager # as both poolManager and poolProxy # onerror continue set context -c srmSpaceManagerEnabled no define env srmSpaceManagerOn.exe endExe set env -c remoteTransferManagerPoolProxy "SrmSpaceManager" set env -c remoteTransferManagerPoolManager "SrmSpaceManager" set context -c srmImplicitSpaceManagerEnabled true set context -c srmSpaceReservationStrict true endExe define env srmSpaceManagerOff.exe endExe srmSpaceReservation=false srmSpaceReservationStrict=false endExe eval ${srmSpaceManagerEnabled} yes == set env srmSpaceManagerIsOn ${rc} exec env srmSpaceManagerOn.exe -run -ifok=srmSpaceManagerIsOn eval ${srmSpaceManageriEnabled} yes != set env srmSpaceManagerIsOff ${rc} exec env srmSpaceManagerOff.exe -run -ifok=srmSpaceManagerIsOff set context -c remoteTransferManagerPoolProxy "PoolManager" set context -c remoteTransferManagerPoolManager "PoolManager" # srmCustomGetHostByAddr enables using the BNL developed procedure # for host by ip resolution if standard InetAddress method failed # set context -c srmCustomGetHostByAddr false # LinkGroupAuthorizationFile contains the list of FQANs that are allowed to # make space reservations in a given link group set context -c SpaceManagerLinkGroupAuthorizationFileName "" # # turning this on turns off the latest changes that made service # to honor the srm client's prococol list order for # get/put commands # this is needed temprorarily to support old srmcp clients set context -c srmIgnoreClientProtocolOrder false # # onerror shutdown # ### This would do the same and leave ${srmDbHost} unset #onerror continue #set context localhost.exe "set context -c srmDatabaseHost localhost" #set context srmdbhost.exe "set context -c srmDatabaseHost ${srmDbHost}" #check srmDbHost #set context srmDbHostIsSet ${rc} #exec context srmdbhost.exe -run -ifok=srmDbHostIsSet #exec context localhost.exe -run -ifnotok=srmDbHostIsSet #onerror shutdown # create diskCacheV111.util.ThreadManager ThreadManager \ "default \ -num-threads=200 \ -thread-timeout=15 \ " # # RemoteHttpTransferManager # # create diskCacheV111.doors.RemoteHttpTransferManager RemoteHttpTransferManager \ "default \ -export \ -pool_manager_timeout=${srmPoolManagerTimeout} \ -pool_timeout=${srmPoolTimeout} \ -pnfs_timeout=${srmPnfsTimeout} \ -mover_timeout=${srmMoverTimeout} \ -max_transfers=${remoteHttpMaxTransfers} \ " # # RemoteGsiftpTransferManager # create diskCacheV111.services.GsiftpTransferManager RemoteGsiftpTransferManager \ "default -export \ -pool_manager_timeout=${srmPoolManagerTimeout} \ -pool_timeout=${srmPoolTimeout} \ -pnfs_timeout=${srmPnfsTimeout} \ -mover_timeout=${srmMoverTimeout} \ -max_transfers=${remoteGsiftpMaxTransfers} \ -io-queue=${remoteGsiftpIoQueue} \ -jdbcUrl=jdbc:postgresql://${srmDatabaseHost}/${srmDbName} \ -jdbcDriver=org.postgresql.Driver \ -dbUser=${srmDbUser} \ -dbPass=${srmDbPassword} \ -pgPass=${srmPasswordFile} \ -doDbLog=${srmDbLogEnabled} \ -poolManager=${remoteTransferManagerPoolManager} \ -poolProxy=${remoteTransferManagerPoolProxy} \ " # # Copy Manager Cell # create diskCacheV111.doors.CopyManager CopyManager \ "default -export \ -pool_manager_timeout=${srmPoolManagerTimeout} \ -pool_timeout=${srmPoolTimeout} \ -pnfs_timeout=${srmPnfsTimeout} \ -mover_timeout=${srmMoverTimeout} \ -max_transfers=${remoteCopyMaxTransfers} \ -poolManager=${remoteTransferManagerPoolManager} \ -poolProxy=${remoteTransferManagerPoolProxy} \ " # # SRM Space Manager # create diskCacheV111.services.space.ManagerV2 SrmSpaceManager \ "default \ -export \ -jdbcUrl=jdbc:postgresql://${srmDatabaseHost}/${srmDbName} \ -jdbcDriver=org.postgresql.Driver \ -dbUser=${srmDbUser} \ -dbPass=${srmDbPassword} \ -poolManager=PoolManager \ -pnfsManager=PnfsManager \ -defaultRetentionPolicy=${SpaceManagerDefaultRetentionPolicy} \ -defaultAccessLatency=${SpaceManagerDefaultAccessLatency} \ -reserveSpaceForNonSRMTransfers=${SpaceManagerReserveSpaceForNonSRMTransfers} \ -deleteStoredFileRecord=false \ -returnFlushedSpaceToReservation=true \ -returnRemovedSpaceToReservation=true \ -linkGroupAuthorizationFileName=${SpaceManagerLinkGroupAuthorizationFileName} \ -spaceManagerEnabled=${srmSpaceManagerEnabled} \ " create diskCacheV111.srm.dcache.Storage SRM-${thisHostname} \ "-srmport=${srmPort} \ -export \ -srmversion=${srmVersion} \ -timout=${srmTimeout} \ -pnfsManager=${srmPnfsManager} \ -pnfs-timeout=${srmPnfsTimeout} \ -poolManager=${srmPoolManager} \ -pool-manager-timeout=${srmPoolManagerTimeout} \ -vacuum=${srmVacuum} \ -vacuum-period=${srmVacuumPeriod} \ -pnfs-srm-path=${pnfsSrmPath} \ -gsissl=true \ -reserve-space-implicitly=${srmImplicitSpaceManagerEnabled} \ -space-reservation-strict=${srmSpaceReservationStrict} \ -credentials-dir=${srmUserCredentialsDirectory} \ -buffer_size=${srmBufferSize} \ -tcp_buffer_size=${srmTcpBufferSize} \ -parallel_streams=${parallelStreams} \ -debug=${srmDebug} \ -usekftp=false \ -get-lifetime=${srmGetLifeTime} \ -put-lifetime=${srmPutLifeTime} \ -copy-lifetime=${srmCopyLifeTime} \ -get-req-thread-queue-size=${srmGetReqThreadQueueSize} \ -get-req-thread-pool-size=${srmGetReqThreadPoolSize} \ -get-req-max-waiting-requests=${srmGetReqMaxWaitingRequests} \ -get-req-ready-queue-size=${srmGetReqReadyQueueSize} \ -get-req-max-ready-requests=${srmGetReqMaxReadyRequests} \ -get-req-max-number-of-retries=${srmGetReqMaxNumberOfRetries} \ -get-req-retry-timeout=${srmGetReqRetryTimeout} \ -get-req-max-num-of-running-by-same-owner=${srmGetReqMaxNumOfRunningBySameOwner} \ -put-req-thread-queue-size=${srmPutReqThreadQueueSize} \ -put-req-thread-pool-size=${srmPutReqThreadPoolSize} \ -put-req-max-waiting-requests=${srmPutReqMaxWaitingRequests} \ -put-req-ready-queue-size=${srmPutReqReadyQueueSize} \ -put-req-max-ready-requests=${srmPutReqMaxReadyRequests} \ -put-req-max-number-of-retries=${srmPutReqMaxNumberOfRetries} \ -put-req-retry-timeout=${srmPutReqRetryTimeout} \ -put-req-max-num-of-running-by-same-owner=${srmPutReqMaxNumOfRunningBySameOwner} \ -copy-req-thread-queue-size=${srmCopyReqThreadQueueSize} \ -copy-req-thread-pool-size=${srmCopyReqThreadPoolSize} \ -copy-req-max-waiting-requests=${srmCopyReqMaxWaitingRequests} \ -copy-req-max-number-of-retries=${srmCopyReqMaxNumberOfRetries} \ -copy-req-retry-timeout=${srmCopyReqRetryTimeout} \ -copy-req-max-num-of-running-by-same-owner=${srmCopyReqMaxNumOfRunningBySameOwner} \ -recursive-dirs-creation=${RecursiveDirectoryCreation} \ -advisory-delete=${AdvisoryDelete} \ -jdbcUrl=jdbc:postgresql://${srmDatabaseHost}/${srmDbName} \ -jdbcDriver=org.postgresql.Driver \ -dbUser=${srmDbUser} \ -dbPass=${srmDbPassword} \ -pgPass=${srmPasswordFile} \ -jdbc-monitoring-log=${srmJdbcMonitoringLogEnabled} \ -num-days-history=${srmNumberOfDaysInDatabaseHistory} \ -old-request-remove-period-secs=${srmOldRequestRemovalPeriodSeconds} \ -jdbc-execution-thread-num=${srmJdbcExecutionThreadNum} \ -max-queued-jdbc-tasks-num=${srmMaxNumberOfJdbcTasksInQueue} \ -use-gplazma-authorization-cell=${useGPlazmaAuthorizationCell} \ -delegate-to-gplazma=${delegateToGPlazma} \ -use-gplazma-authorization-module=${useGPlazmaAuthorizationModule} \ -gplazma-authorization-module-policy=${gplazmaPolicy} \ -srm-authz-cache-lifetime=${srmAuthzCacheLifetime} \ -srmLoginBroker=srm-LoginBroker \ -protocolFamily=SRM \ -protocolVersion=1.1.1 \ -kpwd-file=${kpwdFile} \ # -loginBroker=LoginBroker \ # -brokerUpdateTime=300 \ -start_server=false \ -use_lambdastation=${useLambdaStation} \ -lambdastation_map_file=${lsMapFile} \ -lambdastation_script=${lsScript} \ -login-broker-update-period=${srmLoginBrokerUpdatePeriod} \ -num-doors-in-rand-selection=${srmNumberOfDoorsInRandomSelection} \ -overwrite=${overwriteEnabled} \ -overwrite_by_default=${srmOverwriteByDefault} \ -custom-get-host-by-addr=${srmCustomGetHostByAddr} \ -ignore-client-protocol-order=${srmIgnoreClientProtocolOrder}\ "