Commit fc505427 authored by Steven Murray's avatar Steven Murray
Browse files

Removed CASTOR configuration fields from ForkDataTransfer message

The ProcessForker can impose "entire lifetime" or "per mount"
refreshes of CASTOR configuration-parameters.  There is no
need for the tapeserverd parent process to do this and send
the results over the wire.
parent ec7bb588
...@@ -477,6 +477,10 @@ ...@@ -477,6 +477,10 @@
# parameter to take affect. # parameter to take affect.
#RTCOPYD REUSE_MOUNT TRUE #RTCOPYD REUSE_MOUNT TRUE
# The number of disk I/O threads.
#RTCPD THREAD_POOL 3
# A list of hosts which are trusted to issue special commands to rtcpd and VDQM # A list of hosts which are trusted to issue special commands to rtcpd and VDQM
#ADMIN HOSTS host1 host2 ... #ADMIN HOSTS host1 host2 ...
......
...@@ -36,20 +36,4 @@ message ForkDataTransfer { ...@@ -36,20 +36,4 @@ message ForkDataTransfer {
required uint32 clientegid = 10; required uint32 clientegid = 10;
required string clienthost = 11; required string clienthost = 11;
required string clientusername = 12; required string clientusername = 12;
// Configuration parameters of the session
required uint32 memblocksize = 13;
required uint32 nbmemblocks = 14;
required string badmirhandling = 15;
required uint64 bulkrequestmigrationmaxbytes = 16;
required uint64 bulkrequestmigrationmaxfiles = 17;
required uint64 bulkrequestrecallmaxbytes = 18;
required uint64 bulkrequestrecallmaxfiles = 19;
required uint64 maxbytesbeforeflush = 20;
required uint64 maxfilesbeforeflush = 21;
required uint32 diskthreadpoolsize = 22;
required uint32 rmcport = 23;
required string remotefileprotocol = 24;
required string xrootprivatekey = 25;
} }
...@@ -4,6 +4,7 @@ add_library(castorTapeServerDaemon ...@@ -4,6 +4,7 @@ add_library(castorTapeServerDaemon
AdminAcceptHandler.cpp AdminAcceptHandler.cpp
AdminConnectionHandler.cpp AdminConnectionHandler.cpp
../client/ClientProxy.cpp ../client/ClientProxy.cpp
DataTransferConfig.cpp
DiskReadThreadPool.cpp DiskReadThreadPool.cpp
DiskReadTask.cpp DiskReadTask.cpp
DiskWriteTask.cpp DiskWriteTask.cpp
...@@ -25,6 +26,7 @@ add_library(castorTapeServerDaemon ...@@ -25,6 +26,7 @@ add_library(castorTapeServerDaemon
DataTransferSession.cpp DataTransferSession.cpp
ProcessForker.cpp ProcessForker.cpp
ProcessForkerConnectionHandler.cpp ProcessForkerConnectionHandler.cpp
ProcessForkerOneTimeConfig.cpp
ProcessForkerProxy.cpp ProcessForkerProxy.cpp
ProcessForkerProxyDummy.cpp ProcessForkerProxyDummy.cpp
ProcessForkerProxySocket.cpp ProcessForkerProxySocket.cpp
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
castor::tape::tapeserver::daemon::Catalogue::Catalogue( castor::tape::tapeserver::daemon::Catalogue::Catalogue(
const int netTimeout, const int netTimeout,
log::Logger &log, log::Logger &log,
const DataTransferSession::CastorConf &dataTransferConfig,
ProcessForkerProxy &processForker, ProcessForkerProxy &processForker,
legacymsg::CupvProxy &cupv, legacymsg::CupvProxy &cupv,
legacymsg::VdqmProxy &vdqm, legacymsg::VdqmProxy &vdqm,
...@@ -41,7 +40,6 @@ castor::tape::tapeserver::daemon::Catalogue::Catalogue( ...@@ -41,7 +40,6 @@ castor::tape::tapeserver::daemon::Catalogue::Catalogue(
const std::string &hostName): const std::string &hostName):
m_netTimeout(netTimeout), m_netTimeout(netTimeout),
m_log(log), m_log(log),
m_dataTransferConfig(dataTransferConfig),
m_processForker(processForker), m_processForker(processForker),
m_cupv(cupv), m_cupv(cupv),
m_vdqm(vdqm), m_vdqm(vdqm),
...@@ -116,7 +114,7 @@ void castor::tape::tapeserver::daemon::Catalogue::enterDriveConfig( ...@@ -116,7 +114,7 @@ void castor::tape::tapeserver::daemon::Catalogue::enterDriveConfig(
// Insert it // Insert it
m_drives[driveConfig.unitName] = new CatalogueDrive(m_netTimeout, m_drives[driveConfig.unitName] = new CatalogueDrive(m_netTimeout,
m_log, m_processForker, m_cupv, m_vdqm, m_vmgr, m_hostName, driveConfig, m_log, m_processForker, m_cupv, m_vdqm, m_vmgr, m_hostName, driveConfig,
m_dataTransferConfig, CatalogueDrive::DRIVE_STATE_DOWN); CatalogueDrive::DRIVE_STATE_DOWN);
// Else the drive is already in the catalogue // Else the drive is already in the catalogue
} else { } else {
castor::exception::Exception ex; castor::exception::Exception ex;
......
...@@ -57,7 +57,6 @@ public: ...@@ -57,7 +57,6 @@ public:
* @param netTimeout Timeout in seconds to be used when performing network * @param netTimeout Timeout in seconds to be used when performing network
* I/O. * I/O.
* @param log Object representing the API of the CASTOR logging system. * @param log Object representing the API of the CASTOR logging system.
* @param dataTransferConfig The configuration of a data-transfer session.
* @param processForker Proxy object representing the ProcessForker. * @param processForker Proxy object representing the ProcessForker.
* @param cupv Proxy object representing the cupvd daemon. * @param cupv Proxy object representing the cupvd daemon.
* @param vdqm Proxy object representing the vdqmd daemon. * @param vdqm Proxy object representing the vdqmd daemon.
...@@ -68,7 +67,6 @@ public: ...@@ -68,7 +67,6 @@ public:
Catalogue( Catalogue(
const int netTimeout, const int netTimeout,
log::Logger &log, log::Logger &log,
const DataTransferSession::CastorConf &dataTransferConfig,
ProcessForkerProxy &processForker, ProcessForkerProxy &processForker,
legacymsg::CupvProxy &cupv, legacymsg::CupvProxy &cupv,
legacymsg::VdqmProxy &vdqm, legacymsg::VdqmProxy &vdqm,
...@@ -161,11 +159,6 @@ private: ...@@ -161,11 +159,6 @@ private:
*/ */
log::Logger &m_log; log::Logger &m_log;
/**
* The configuration of a data-transfer session.
*/
const DataTransferSession::CastorConf m_dataTransferConfig;
/** /**
* Proxy object representing the ProcessForker. * Proxy object representing the ProcessForker.
*/ */
......
...@@ -43,7 +43,6 @@ castor::tape::tapeserver::daemon::CatalogueDrive::CatalogueDrive( ...@@ -43,7 +43,6 @@ castor::tape::tapeserver::daemon::CatalogueDrive::CatalogueDrive(
legacymsg::VmgrProxy &vmgr, legacymsg::VmgrProxy &vmgr,
const std::string &hostName, const std::string &hostName,
const utils::DriveConfig &config, const utils::DriveConfig &config,
const DataTransferSession::CastorConf &dataTransferConfig,
const DriveState state) const DriveState state)
throw(): throw():
m_netTimeout(netTimeout), m_netTimeout(netTimeout),
...@@ -54,7 +53,6 @@ castor::tape::tapeserver::daemon::CatalogueDrive::CatalogueDrive( ...@@ -54,7 +53,6 @@ castor::tape::tapeserver::daemon::CatalogueDrive::CatalogueDrive(
m_vmgr(vmgr), m_vmgr(vmgr),
m_hostName(hostName), m_hostName(hostName),
m_config(config), m_config(config),
m_dataTransferConfig(dataTransferConfig),
m_state(state), m_state(state),
m_sessionType(SESSION_TYPE_NONE), m_sessionType(SESSION_TYPE_NONE),
m_session(NULL) { m_session(NULL) {
...@@ -491,7 +489,6 @@ void castor::tape::tapeserver::daemon::CatalogueDrive::receivedVdqmJob( ...@@ -491,7 +489,6 @@ void castor::tape::tapeserver::daemon::CatalogueDrive::receivedVdqmJob(
m_log, m_log,
m_netTimeout, m_netTimeout,
m_config, m_config,
m_dataTransferConfig,
job, job,
m_vmgr, m_vmgr,
m_cupv, m_cupv,
......
...@@ -174,7 +174,6 @@ public: ...@@ -174,7 +174,6 @@ public:
* @param hostName The name of the host on which the daemon is running. This * @param hostName The name of the host on which the daemon is running. This
* name is needed to fill in messages to be sent to the vdqmd daemon. * name is needed to fill in messages to be sent to the vdqmd daemon.
* @param config The configuration of the tape drive. * @param config The configuration of the tape drive.
* @param dataTransferConfig The configuration of a data-transfer session.
* @param state The initial state of the tape drive. * @param state The initial state of the tape drive.
*/ */
CatalogueDrive( CatalogueDrive(
...@@ -186,7 +185,6 @@ public: ...@@ -186,7 +185,6 @@ public:
legacymsg::VmgrProxy &vmgr, legacymsg::VmgrProxy &vmgr,
const std::string &hostName, const std::string &hostName,
const utils::DriveConfig &config, const utils::DriveConfig &config,
const DataTransferSession::CastorConf &dataTransferConfig,
const DriveState state) throw(); const DriveState state) throw();
/** /**
...@@ -467,11 +465,6 @@ private: ...@@ -467,11 +465,6 @@ private:
*/ */
tape::utils::DriveConfig m_config; tape::utils::DriveConfig m_config;
/**
* The configuration of a data-transfer session.
*/
const DataTransferSession::CastorConf m_dataTransferConfig;
/** /**
* The current state of the tape drive. * The current state of the tape drive.
*/ */
......
...@@ -60,7 +60,6 @@ TEST_F(castor_tape_tapeserver_daemon_CatalogueTest, goodDayPopulate) { ...@@ -60,7 +60,6 @@ TEST_F(castor_tape_tapeserver_daemon_CatalogueTest, goodDayPopulate) {
driveConfigs.enterTpconfigLines(lines); driveConfigs.enterTpconfigLines(lines);
castor::log::DummyLogger log("unittest"); castor::log::DummyLogger log("unittest");
const DataTransferSession::CastorConf dataTransferConfig;
ProcessForkerProxyDummy processForker; ProcessForkerProxyDummy processForker;
const bool isGrantedReturnValue = true; const bool isGrantedReturnValue = true;
castor::legacymsg::CupvProxyDummy cupv(isGrantedReturnValue); castor::legacymsg::CupvProxyDummy cupv(isGrantedReturnValue);
...@@ -68,8 +67,8 @@ TEST_F(castor_tape_tapeserver_daemon_CatalogueTest, goodDayPopulate) { ...@@ -68,8 +67,8 @@ TEST_F(castor_tape_tapeserver_daemon_CatalogueTest, goodDayPopulate) {
castor::legacymsg::VmgrProxyDummy vmgr; castor::legacymsg::VmgrProxyDummy vmgr;
const std::string hostName = ""; const std::string hostName = "";
const int netTimeout = 1; const int netTimeout = 1;
Catalogue catalogue(netTimeout, log, dataTransferConfig, processForker, Catalogue catalogue(netTimeout, log, processForker, cupv, vdqm, vmgr,
cupv, vdqm, vmgr, hostName); hostName);
ASSERT_NO_THROW(catalogue.populate(driveConfigs)); ASSERT_NO_THROW(catalogue.populate(driveConfigs));
{ {
...@@ -141,15 +140,14 @@ TEST_F(castor_tape_tapeserver_daemon_CatalogueTest, ...@@ -141,15 +140,14 @@ TEST_F(castor_tape_tapeserver_daemon_CatalogueTest,
const std::string unitName = "DRIVE"; const std::string unitName = "DRIVE";
const int netTimeout = 1; const int netTimeout = 1;
castor::log::DummyLogger log("unittest"); castor::log::DummyLogger log("unittest");
const DataTransferSession::CastorConf dataTransferConfig;
ProcessForkerProxyDummy processForker; ProcessForkerProxyDummy processForker;
const bool isGrantedReturnValue = true; const bool isGrantedReturnValue = true;
castor::legacymsg::CupvProxyDummy cupv(isGrantedReturnValue); castor::legacymsg::CupvProxyDummy cupv(isGrantedReturnValue);
castor::legacymsg::VdqmProxyDummy vdqm; castor::legacymsg::VdqmProxyDummy vdqm;
castor::legacymsg::VmgrProxyDummy vmgr; castor::legacymsg::VmgrProxyDummy vmgr;
const std::string hostName = ""; const std::string hostName = "";
Catalogue catalogue(netTimeout, log, dataTransferConfig, processForker, Catalogue catalogue(netTimeout, log, processForker, cupv, vdqm, vmgr,
cupv, vdqm, vmgr, hostName); hostName);
ASSERT_THROW(catalogue.findDrive(unitName), castor::exception::Exception); ASSERT_THROW(catalogue.findDrive(unitName), castor::exception::Exception);
} }
...@@ -163,15 +161,14 @@ TEST_F(castor_tape_tapeserver_daemon_CatalogueTest, dgnMismatchStart) { ...@@ -163,15 +161,14 @@ TEST_F(castor_tape_tapeserver_daemon_CatalogueTest, dgnMismatchStart) {
const int netTimeout = 1; const int netTimeout = 1;
castor::log::DummyLogger log("unittest"); castor::log::DummyLogger log("unittest");
const DataTransferSession::CastorConf dataTransferConfig;
ProcessForkerProxyDummy processForker; ProcessForkerProxyDummy processForker;
const bool isGrantedReturnValue = true; const bool isGrantedReturnValue = true;
castor::legacymsg::CupvProxyDummy cupv(isGrantedReturnValue); castor::legacymsg::CupvProxyDummy cupv(isGrantedReturnValue);
castor::legacymsg::VdqmProxyDummy vdqm; castor::legacymsg::VdqmProxyDummy vdqm;
castor::legacymsg::VmgrProxyDummy vmgr; castor::legacymsg::VmgrProxyDummy vmgr;
const std::string hostName = ""; const std::string hostName = "";
Catalogue catalogue(netTimeout, log, dataTransferConfig, processForker, Catalogue catalogue(netTimeout, log, processForker, cupv, vdqm, vmgr,
cupv, vdqm, vmgr, hostName); hostName);
ASSERT_NO_THROW(catalogue.populate(driveConfigs)); ASSERT_NO_THROW(catalogue.populate(driveConfigs));
CatalogueDrive &unit = catalogue.findDrive("UNIT"); CatalogueDrive &unit = catalogue.findDrive("UNIT");
ASSERT_EQ(CatalogueDrive::DRIVE_STATE_DOWN, unit.getState()); ASSERT_EQ(CatalogueDrive::DRIVE_STATE_DOWN, unit.getState());
...@@ -202,15 +199,14 @@ TEST_F(castor_tape_tapeserver_daemon_CatalogueTest, getUnitNames) { ...@@ -202,15 +199,14 @@ TEST_F(castor_tape_tapeserver_daemon_CatalogueTest, getUnitNames) {
const int netTimeout = 1; const int netTimeout = 1;
castor::log::DummyLogger log("unittest"); castor::log::DummyLogger log("unittest");
const DataTransferSession::CastorConf dataTransferConfig;
ProcessForkerProxyDummy processForker; ProcessForkerProxyDummy processForker;
const bool isGrantedReturnValue = true; const bool isGrantedReturnValue = true;
castor::legacymsg::CupvProxyDummy cupv(isGrantedReturnValue); castor::legacymsg::CupvProxyDummy cupv(isGrantedReturnValue);
castor::legacymsg::VdqmProxyDummy vdqm; castor::legacymsg::VdqmProxyDummy vdqm;
castor::legacymsg::VmgrProxyDummy vmgr; castor::legacymsg::VmgrProxyDummy vmgr;
const std::string hostName = ""; const std::string hostName = "";
Catalogue catalogue(netTimeout, log, dataTransferConfig, processForker, Catalogue catalogue(netTimeout, log, processForker, cupv, vdqm, vmgr,
cupv, vdqm, vmgr, hostName); hostName);
ASSERT_NO_THROW(catalogue.populate(driveConfigs)); ASSERT_NO_THROW(catalogue.populate(driveConfigs));
{ {
......
...@@ -42,7 +42,6 @@ castor::tape::tapeserver::daemon::CatalogueTransferSession* ...@@ -42,7 +42,6 @@ castor::tape::tapeserver::daemon::CatalogueTransferSession*
log::Logger &log, log::Logger &log,
const int netTimeout, const int netTimeout,
const tape::utils::DriveConfig &driveConfig, const tape::utils::DriveConfig &driveConfig,
const DataTransferSession::CastorConf &dataTransferConfig,
const legacymsg::RtcpJobRqstMsgBody &vdqmJob, const legacymsg::RtcpJobRqstMsgBody &vdqmJob,
legacymsg::VmgrProxy &vmgr, legacymsg::VmgrProxy &vmgr,
legacymsg::CupvProxy &cupv, legacymsg::CupvProxy &cupv,
...@@ -51,15 +50,13 @@ castor::tape::tapeserver::daemon::CatalogueTransferSession* ...@@ -51,15 +50,13 @@ castor::tape::tapeserver::daemon::CatalogueTransferSession*
const unsigned short rmcPort, const unsigned short rmcPort,
ProcessForkerProxy &processForker) { ProcessForkerProxy &processForker) {
const pid_t pid = processForker.forkDataTransfer(driveConfig, vdqmJob, const pid_t pid = processForker.forkDataTransfer(driveConfig, vdqmJob);
dataTransferConfig, rmcPort);
return new CatalogueTransferSession( return new CatalogueTransferSession(
log, log,
netTimeout, netTimeout,
pid, pid,
driveConfig, driveConfig,
dataTransferConfig,
vdqmJob, vdqmJob,
vmgr, vmgr,
cupv, cupv,
...@@ -76,7 +73,6 @@ castor::tape::tapeserver::daemon::CatalogueTransferSession:: ...@@ -76,7 +73,6 @@ castor::tape::tapeserver::daemon::CatalogueTransferSession::
const int netTimeout, const int netTimeout,
const pid_t pid, const pid_t pid,
const tape::utils::DriveConfig &driveConfig, const tape::utils::DriveConfig &driveConfig,
const DataTransferSession::CastorConf &dataTransferConfig,
const legacymsg::RtcpJobRqstMsgBody &vdqmJob, const legacymsg::RtcpJobRqstMsgBody &vdqmJob,
legacymsg::VmgrProxy &vmgr, legacymsg::VmgrProxy &vmgr,
legacymsg::CupvProxy &cupv, legacymsg::CupvProxy &cupv,
...@@ -87,7 +83,6 @@ castor::tape::tapeserver::daemon::CatalogueTransferSession:: ...@@ -87,7 +83,6 @@ castor::tape::tapeserver::daemon::CatalogueTransferSession::
m_mode(WRITE_DISABLE), m_mode(WRITE_DISABLE),
m_lastTimeSomeBlocksWereMoved(time(0)), m_lastTimeSomeBlocksWereMoved(time(0)),
m_assignmentTime(time(0)), m_assignmentTime(time(0)),
m_dataTransferConfig(dataTransferConfig),
m_vdqmJob(vdqmJob), m_vdqmJob(vdqmJob),
m_vmgr(vmgr), m_vmgr(vmgr),
m_cupv(cupv), m_cupv(cupv),
......
...@@ -52,7 +52,6 @@ public: ...@@ -52,7 +52,6 @@ public:
* @param netTimeout Timeout in seconds to be used when performing network * @param netTimeout Timeout in seconds to be used when performing network
* I/O. * I/O.
* @param driveConfig The configuration of the tape drive. * @param driveConfig The configuration of the tape drive.
* @param dataTransferConfig The configuration of a data-transfer session.
* @param vdqmJob job received from the vdqmd daemon. * @param vdqmJob job received from the vdqmd daemon.
* @param vmgr Proxy object representing the vmgrd daemon. * @param vmgr Proxy object representing the vmgrd daemon.
* @param cupv Proxy object representing the cupvd daemon. * @param cupv Proxy object representing the cupvd daemon.
...@@ -68,7 +67,6 @@ public: ...@@ -68,7 +67,6 @@ public:
log::Logger &log, log::Logger &log,
const int netTimeout, const int netTimeout,
const tape::utils::DriveConfig &driveConfig, const tape::utils::DriveConfig &driveConfig,
const DataTransferSession::CastorConf &dataTransferConfig,
const legacymsg::RtcpJobRqstMsgBody &vdqmJob, const legacymsg::RtcpJobRqstMsgBody &vdqmJob,
legacymsg::VmgrProxy &vmgr, legacymsg::VmgrProxy &vmgr,
legacymsg::CupvProxy &cupv, legacymsg::CupvProxy &cupv,
...@@ -226,7 +224,6 @@ protected: ...@@ -226,7 +224,6 @@ protected:
* I/O. * I/O.
* @param pid The process identifier of the session. * @param pid The process identifier of the session.
* @param driveConfig The configuration of the tape drive. * @param driveConfig The configuration of the tape drive.
* @param dataTransferConfig The configuration of a data-transfer session.
* @param vdqmJob job received from the vdqmd daemon. * @param vdqmJob job received from the vdqmd daemon.
* @param vmgr Proxy object representing the vmgrd daemon. * @param vmgr Proxy object representing the vmgrd daemon.
* @param cupv Proxy object representing the cupvd daemon. * @param cupv Proxy object representing the cupvd daemon.
...@@ -240,7 +237,6 @@ protected: ...@@ -240,7 +237,6 @@ protected:
const int netTimeout, const int netTimeout,
const pid_t pid, const pid_t pid,
const tape::utils::DriveConfig &driveConfig, const tape::utils::DriveConfig &driveConfig,
const DataTransferSession::CastorConf &dataTransferConfig,
const legacymsg::RtcpJobRqstMsgBody &vdqmJob, const legacymsg::RtcpJobRqstMsgBody &vdqmJob,
legacymsg::VmgrProxy &vmgr, legacymsg::VmgrProxy &vmgr,
legacymsg::CupvProxy &cupv, legacymsg::CupvProxy &cupv,
...@@ -291,11 +287,6 @@ private: ...@@ -291,11 +287,6 @@ private:
*/ */
const time_t m_assignmentTime; const time_t m_assignmentTime;
/**
* The configuration of a data-transfer session.
*/
const DataTransferSession::CastorConf m_dataTransferConfig;
/** /**
* The job received from the vdqmd daemon. * The job received from the vdqmd daemon.
*/ */
......
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include "castor/common/CastorConfiguration.hpp"
#include "castor/tape/tapeserver/Constants.hpp"
#include "castor/tape/tapeserver/daemon/DataTransferConfig.hpp"
#include "h/rtcp_constants.h"
#include "h/rtcpd_constants.h"
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
castor::tape::tapeserver::daemon::DataTransferConfig::DataTransferConfig():
bufsz(0),
nbBufs(0),
bulkRequestMigrationMaxBytes(0),
bulkRequestMigrationMaxFiles(0),
bulkRequestRecallMaxBytes(0),
bulkRequestRecallMaxFiles(0),
maxBytesBeforeFlush(0),
maxFilesBeforeFlush(0),
nbDiskThreads(0) {
}
//------------------------------------------------------------------------------
// createFromCastorConf
//------------------------------------------------------------------------------
castor::tape::tapeserver::daemon::DataTransferConfig::DataTransferConfig
castor::tape::tapeserver::daemon::DataTransferConfig::createFromCastorConf(
log::Logger *const log) {
common::CastorConfiguration &castorConf =
common::CastorConfiguration::getConfig();
DataTransferConfig config;
config.bufsz = castorConf.getConfEntInt(
"RTCOPYD", "BUFSZ", (uint32_t)RTCP_BUFSZ, log);
config.nbBufs = castorConf.getConfEntInt<uint32_t>(
"RTCOPYD", "NB_BUFS", log);
config.tapeBadMIRHandlingRepair = castorConf.getConfEntString(
"TAPE", "BADMIR_HANDLING", "CANCEL", log);
config.bulkRequestMigrationMaxBytes = castorConf.getConfEntInt(
"TAPEBRIDGE", "BULKREQUESTMIGRATIONMAXBYTES",
(uint64_t)TAPEBRIDGE_BULKREQUESTMIGRATIONMAXBYTES, log);
config.bulkRequestMigrationMaxFiles = castorConf.getConfEntInt(
"TAPEBRIDGE", "BULKREQUESTMIGRATIONMAXFILES",
(uint64_t)TAPEBRIDGE_BULKREQUESTMIGRATIONMAXFILES, log);
config.bulkRequestRecallMaxBytes = castorConf.getConfEntInt(
"TAPEBRIDGE", "BULKREQUESTRECALLMAXBYTES",
(uint64_t)TAPEBRIDGE_BULKREQUESTRECALLMAXBYTES, log);
config.bulkRequestRecallMaxFiles = castorConf.getConfEntInt(
"TAPEBRIDGE", "BULKREQUESTRECALLMAXFILES",
(uint64_t)TAPEBRIDGE_BULKREQUESTRECALLMAXFILES, log);
config.maxBytesBeforeFlush = castorConf.getConfEntInt(
"TAPEBRIDGE", "MAXBYTESBEFOREFLUSH",
(uint64_t)TAPEBRIDGE_MAXBYTESBEFOREFLUSH, log);
config.maxFilesBeforeFlush = castorConf.getConfEntInt(
"TAPEBRIDGE", "MAXFILESBEFOREFLUSH",
(uint64_t)TAPEBRIDGE_MAXFILESBEFOREFLUSH, log);
config.nbDiskThreads = castorConf.getConfEntInt(
"RTCPD", "THREAD_POOL", (uint32_t)RTCPD_THREAD_POOL, log);
config.remoteFileProtocol = castorConf.getConfEntString(
"TAPESERVERD", "REMOTEFILEPROTOCOL", "RFIO", log);
config.xrootPrivateKey = castorConf.getConfEntString(
"XROOT", "PRIVATEKEY", "/opt/xrootd/keys/key.pem", log);
return config;
}
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include "castor/log/Logger.hpp"
#include <stdint.h>
#include <string>
namespace castor {
namespace tape {
namespace tapeserver {
namespace daemon {