Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
68e267a7
Commit
68e267a7
authored
Nov 06, 2014
by
Steven Murray
Browse files
Renamed the TAPESERVERD castor.conf parameters
parent
5215b1fe
Changes
8
Hide whitespace changes
Inline
Side-by-side
castor/castor.conf
View file @
68e267a7
...
...
@@ -505,23 +505,27 @@
## Tapeserverd #################################################################
#TAPESERVERD NB_BUFS 300
# Number of
rtcop
y buffers
for a 2G machine (1G machine? put 160)
#T
APESERVERD BUFSZ 5242880 # Size of a buffer (5M is the default)
# Number of
memor
y buffers
in the data-transfer cache.
#T
apeServer NbBufs 300
# The number of disk I/O threads.
#TAPESERVERD THREAD_POOL 10
# Size of a memory buffer in the data-transfer cache in bytes (default is 5
# Mebibytes)
#TapeServer BufSize 5242880
# The number of disk I/O threads
#TapeServer NbDiskThreads 10
# The maximum time in seconds that the data-transfer session can take to get the
# transfer job from the client.
#T
APESERVERD WAITJOBTIMEOUT
60
#T
apeServer WaitJobTimeout
60
# The maximum time in seconds that the data-transfer session can take to mount a
# tape.
#T
APESERVERD MOUNTTIMEOUT
900
#T
apeServer MountTimeout
900
# The maximum time in seconds the data-transfer session of tapeserverd can
# cease to move data blocks
#T
APESERVERD BLKMOVETIMEOUT
300
#T
apeServer BlkMoveTimeout
300
# When the tapeserverd daemon requests the tapegatewayd daemon for a set of
# files to migrate to tape, this parameter defines the maximum number of bytes
...
...
@@ -532,7 +536,7 @@
# in order for any change in the value of this parameter to be taken into
# account.
#
#T
APESERVERD BULKREQUESTMIGRATIONMAXBYTES
80000000000
#T
apeServer BulkRequestMigrationMaxBytes
80000000000
# When the tapeserverd daemon requests the tapegatewayd daemon for a set of
# files to migrate to tape, this parameter defines the maximum number of files
...
...
@@ -543,9 +547,9 @@
# in order for any change in the value of this parameter to be taken into
# account.
#
#T
APESERVERD BULKREQUESTMIGRATIONMAXFILES
500
#T
apeServer BulkRequestMigrationMaxFiles
500
# When the tape
bridge
d daemon requests the tapegatewayd daemon for a set of
# When the tape
server
d daemon requests the tapegatewayd daemon for a set of
# files to recall from tape, this parameter defines the maximum number of bytes
# the set of files should represent.
#
...
...
@@ -554,7 +558,7 @@
# in order for any change in the value of this parameter to be taken into
# account.
#
#T
APESERVERD BULKREQUESTRECALLMAXBYTES
80000000000
#T
apeServer BulkRequestRecallMaxBytes
80000000000
# When the tapeserverd daemon requests the tapegatewayd daemon for a set of
# files to recall from tape, this parameter defines the maximum number of files
...
...
@@ -565,7 +569,7 @@
# in order for any change in the value of this parameter to be taken into
# account.
#
#T
APESERVERD BULKREQUESTRECALLMAXFILES
500
#T
apeServer BulkRequestRecallMaxFiles
500
# The value of this parameter defines the maximum number of bytes to be written
# to tape before a flush to tape (synchronised tape-mark). Please note that a
...
...
@@ -577,7 +581,7 @@
# in order for any change in the value of this parameter to be taken into
# account.
#
#T
APESERVERD MAXBYTESBEFOREFLUSH
32000000000
#T
apeServer MaxBytesBeforeFlush
32000000000
# The value of this parameter defines the maximum number of files to be written
# to tape before a flush to tape (synchronised or non-immediate tape-mark).
...
...
@@ -587,7 +591,7 @@
# in order for any change in the value of this parameter to be taken into
# account.
#
#T
APESERVERD MAXFILESBEFOREFLUSH
200
#T
apeServer MaxFilesBeforeFlush
200
## Tape Bridge Clients: dumptp, readtp and writetp #############################
...
...
castor/tape/tapeserver/daemon/DataTransferConfig.cpp
View file @
68e267a7
...
...
@@ -53,35 +53,33 @@ castor::tape::tapeserver::daemon::DataTransferConfig
DataTransferConfig
config
;
config
.
bufsz
=
castorConf
.
getConfEntInt
(
"T
APESERVERD"
,
"BUFSZ
"
,
"T
apeServer"
,
"BufSize
"
,
castor
::
tape
::
tapeserver
::
daemon
::
TAPESERVER_BUFSZ_DEFAULT
,
log
);
config
.
nbBufs
=
castorConf
.
getConfEntInt
<
uint32_t
>
(
"TAPESERVERD"
,
"NB_BUFS"
,
log
);
config
.
tapeBadMIRHandlingRepair
=
castorConf
.
getConfEntString
(
"TAPESERVERD"
,
"BADMIR_HANDLING"
,
"CANCEL"
,
log
);
"TapeServer"
,
"NbBufs"
,
log
);
config
.
bulkRequestMigrationMaxBytes
=
castorConf
.
getConfEntInt
(
"T
APESERVERD"
,
"BULKREQUESTMIGRATIONMAXBYTES
"
,
"T
apeServer"
,
"BulkRequestMigrationMaxBytes
"
,
(
uint64_t
)
TAPEBRIDGE_BULKREQUESTMIGRATIONMAXBYTES
,
log
);
config
.
bulkRequestMigrationMaxFiles
=
castorConf
.
getConfEntInt
(
"T
APESERVERD"
,
"BULKREQUESTMIGRATIONMAXFILES
"
,
"T
apeServer"
,
"BulkRequestMigrationMaxFiles
"
,
(
uint64_t
)
TAPEBRIDGE_BULKREQUESTMIGRATIONMAXFILES
,
log
);
config
.
bulkRequestRecallMaxBytes
=
castorConf
.
getConfEntInt
(
"T
APESERVERD"
,
"BULKREQUESTRECALLMAXBYTES
"
,
"T
apeServer"
,
"BulkRequestRecallMaxBytes
"
,
(
uint64_t
)
TAPEBRIDGE_BULKREQUESTRECALLMAXBYTES
,
log
);
config
.
bulkRequestRecallMaxFiles
=
castorConf
.
getConfEntInt
(
"T
APESERVERD"
,
"BULKREQUESTRECALLMAXFILES
"
,
"T
apeServer"
,
"BulkRequestRecallMaxFiles
"
,
(
uint64_t
)
TAPEBRIDGE_BULKREQUESTRECALLMAXFILES
,
log
);
config
.
maxBytesBeforeFlush
=
castorConf
.
getConfEntInt
(
"T
APESERVERD"
,
"MAXBYTESBEFOREFLUSH
"
,
"T
apeServer"
,
"MaxBytesBeforeFlush
"
,
(
uint64_t
)
TAPEBRIDGE_MAXBYTESBEFOREFLUSH
,
log
);
config
.
maxFilesBeforeFlush
=
castorConf
.
getConfEntInt
(
"T
APESERVERD"
,
"MAXFILESBEFOREFLUSH
"
,
"T
apeServer"
,
"MaxFilesBeforeFlush
"
,
(
uint64_t
)
TAPEBRIDGE_MAXFILESBEFOREFLUSH
,
log
);
config
.
nbDiskThreads
=
castorConf
.
getConfEntInt
(
"T
APESERVERD"
,
"THREAD_POOL
"
,
"T
apeServer"
,
"NbDiskThreads
"
,
castor
::
tape
::
tapeserver
::
daemon
::
TAPESERVER_NB_DISK_THREAD_DEFAULT
,
log
);
config
.
remoteFileProtocol
=
castorConf
.
getConfEntString
(
"T
APESERVERD"
,
"REMOTEFILEPROTOCOL
"
,
"RFIO"
,
log
);
"T
apeServer"
,
"RemoteFileProtocol
"
,
"RFIO"
,
log
);
config
.
xrootPrivateKey
=
castorConf
.
getConfEntString
(
"XROOT"
,
"PrivateKey"
,
"/opt/xrootd/keys/key.pem"
,
log
);
...
...
castor/tape/tapeserver/daemon/TapeDaemon.cpp
View file @
68e267a7
...
...
@@ -74,7 +74,8 @@ castor::tape::tapeserver::daemon::TapeDaemon::TapeDaemon(
legacymsg
::
VdqmProxy
&
vdqm
,
legacymsg
::
VmgrProxy
&
vmgr
,
reactor
::
ZMQReactor
&
reactor
,
castor
::
server
::
ProcessCap
&
capUtils
)
:
castor
::
server
::
ProcessCap
&
capUtils
,
const
TapeDaemonConfig
&
tapeDaemonConfig
)
:
castor
::
server
::
Daemon
(
stdOut
,
stdErr
,
log
),
m_state
(
TAPEDAEMON_STATE_RUNNING
),
m_startOfShutdown
(
0
),
...
...
@@ -87,6 +88,7 @@ castor::tape::tapeserver::daemon::TapeDaemon::TapeDaemon(
m_vmgr
(
vmgr
),
m_reactor
(
reactor
),
m_capUtils
(
capUtils
),
m_tapeDaemonConfig
(
tapeDaemonConfig
),
m_programName
(
"tapeserverd"
),
m_hostName
(
getHostName
()),
m_processForker
(
NULL
),
...
...
@@ -191,9 +193,6 @@ void castor::tape::tapeserver::daemon::TapeDaemon::exceptionThrowingMain(
logStartOfDaemon
(
argc
,
argv
);
parseCommandLine
(
argc
,
argv
);
const
TapeDaemonConfig
config
=
TapeDaemonConfig
::
createFromCastorConf
(
&
m_log
);
// Process must be able to change user now and should be permitted to perform
// raw IO in the future
setProcessCapabilities
(
"cap_setgid,cap_setuid+ep cap_sys_rawio+p"
);
...
...
@@ -208,8 +207,6 @@ void castor::tape::tapeserver::daemon::TapeDaemon::exceptionThrowingMain(
m_processForkerPid
=
forkProcessForker
(
cmdPair
,
reaperPair
);
const
ProcessForkerConfig
processForkerConfig
=
ProcessForkerConfig
::
createFromCastorConf
(
&
m_log
);
m_processForker
=
new
ProcessForkerProxySocket
(
m_log
,
cmdPair
.
tapeDaemon
);
m_catalogue
=
new
Catalogue
(
m_netTimeout
,
...
...
@@ -219,9 +216,9 @@ void castor::tape::tapeserver::daemon::TapeDaemon::exceptionThrowingMain(
m_vdqm
,
m_vmgr
,
m_hostName
,
c
onfig
.
waitJobTimeoutInSecs
,
c
onfig
.
mountTimeoutInSecs
,
c
onfig
.
blockMoveTimeoutInSec
);
m_tapeDaemonC
onfig
.
waitJobTimeoutInSecs
,
m_tapeDaemonC
onfig
.
mountTimeoutInSecs
,
m_tapeDaemonC
onfig
.
blockMoveTimeoutInSec
);
m_catalogue
->
populate
(
m_driveConfigs
);
...
...
@@ -542,10 +539,8 @@ void castor::tape::tapeserver::daemon::TapeDaemon::
int
castor
::
tape
::
tapeserver
::
daemon
::
TapeDaemon
::
runProcessForker
(
const
int
cmdReceiverSocket
,
const
int
reaperSenderSocket
)
throw
()
{
try
{
const
ProcessForkerConfig
processForkerConfig
=
ProcessForkerConfig
::
createFromCastorConf
();
ProcessForker
processForker
(
m_log
,
cmdReceiverSocket
,
reaperSenderSocket
,
m_hostName
,
m_argv
[
0
],
processForkerConfig
);
m_hostName
,
m_argv
[
0
],
m_tapeDaemonConfig
.
processForkerConfig
);
processForker
.
execute
();
return
0
;
}
catch
(
castor
::
exception
::
Exception
&
ex
)
{
...
...
castor/tape/tapeserver/daemon/TapeDaemon.hpp
View file @
68e267a7
...
...
@@ -33,7 +33,9 @@
#include
"castor/server/ProcessCap.hpp"
#include
"castor/tape/reactor/ZMQReactor.hpp"
#include
"castor/tape/tapeserver/daemon/Catalogue.hpp"
#include
"castor/tape/tapeserver/daemon/ProcessForkerConfig.hpp"
#include
"castor/tape/tapeserver/daemon/ProcessForkerProxy.hpp"
#include
"castor/tape/tapeserver/daemon/TapeDaemonConfig.hpp"
#include
"castor/tape/utils/DriveConfigMap.hpp"
#include
"castor/tape/utils/utils.hpp"
#include
"castor/utils/utils.hpp"
...
...
@@ -75,6 +77,8 @@ public:
* @param reactor The reactor responsible for dispatching the I/O events of
* the parent process of the tape server daemon.
* @param capUtils Object providing utilities for working UNIX capabilities.
* @param tapeDaemonConfig The CASTOR configuration parameters to be used by
* the tape daemon.
*/
TapeDaemon
(
const
int
argc
,
...
...
@@ -88,7 +92,8 @@ public:
legacymsg
::
VdqmProxy
&
vdqm
,
legacymsg
::
VmgrProxy
&
vmgr
,
reactor
::
ZMQReactor
&
reactor
,
castor
::
server
::
ProcessCap
&
capUtils
);
castor
::
server
::
ProcessCap
&
capUtils
,
const
TapeDaemonConfig
&
tapeDaemonConfig
);
/**
* Destructor.
...
...
@@ -268,6 +273,7 @@ protected:
* @param reaperPair Socket pair used by the ProcessForker to notify the
* TapeDaemon parent process of the termination of ProcessForker child
* processes.
* by the ProcessForker.
* @return The process identifier of the ProcessForker.
*/
pid_t
forkProcessForker
(
const
ForkerCmdPair
&
cmdPair
,
...
...
@@ -334,7 +340,8 @@ protected:
* reports to the TapeDaemon parent process.
* @return the exit code to be used for the process running the ProcessForker.
*/
int
runProcessForker
(
const
int
cmdReceiverSocket
,
int
runProcessForker
(
const
int
cmdReceiverSocket
,
const
int
reaperSenderSocket
)
throw
();
/**
...
...
@@ -569,6 +576,11 @@ protected:
*/
castor
::
server
::
ProcessCap
&
m_capUtils
;
/**
* The CASTOR configuration parameters to be used by the tape daemon.
*/
const
TapeDaemonConfig
m_tapeDaemonConfig
;
/**
* The program name of the daemon.
*/
...
...
castor/tape/tapeserver/daemon/TapeDaemonConfig.cpp
View file @
68e267a7
...
...
@@ -47,13 +47,15 @@ castor::tape::tapeserver::daemon::TapeDaemonConfig
TapeDaemonConfig
config
;
config
.
processForkerConfig
=
ProcessForkerConfig
::
createFromCastorConf
(
log
);
config
.
waitJobTimeoutInSecs
=
castorConf
.
getConfEntInt
(
"TAPESERVERD"
,
"WAITJOBTIMEOUT"
,
(
time_t
)
TAPESERVER_WAITJOBTIMEOUT_DEFAULT
,
log
);
config
.
mountTimeoutInSecs
=
castorConf
.
getConfEntInt
(
"TAPESERVERD"
,
"MOUNTTIMEOUT"
,
(
time_t
)
TAPESERVER_MOUNTTIMEOUT_DEFAULT
,
log
);
config
.
blockMoveTimeoutInSec
=
castorConf
.
getConfEntInt
(
"TAPESERVERD"
,
"BLKMOVETIMEOUT"
,
(
time_t
)
TAPESERVER_BLKMOVETIMEOUT_DEFAULT
,
log
);
config
.
cupvHost
=
castorConf
.
getConfEntString
(
"UPV"
,
"HOST"
,
log
);
config
.
vdqmHost
=
castorConf
.
getConfEntString
(
"VDQM"
,
"HOST"
,
log
);
config
.
vmgrHost
=
castorConf
.
getConfEntString
(
"VMGR"
,
"HOST"
,
log
);
config
.
waitJobTimeoutInSecs
=
castorConf
.
getConfEntInt
(
"TapeServer"
,
"WaitJobTimeout"
,
(
time_t
)
TAPESERVER_WAITJOBTIMEOUT_DEFAULT
,
log
);
config
.
mountTimeoutInSecs
=
castorConf
.
getConfEntInt
(
"TapeServer"
,
"MountTimeout"
,
(
time_t
)
TAPESERVER_MOUNTTIMEOUT_DEFAULT
,
log
);
config
.
blockMoveTimeoutInSec
=
castorConf
.
getConfEntInt
(
"TapeServer"
,
"BlkMoveTimeout"
,
(
time_t
)
TAPESERVER_BLKMOVETIMEOUT_DEFAULT
,
log
);
return
config
;
}
castor/tape/tapeserver/daemon/TapeDaemonConfig.hpp
View file @
68e267a7
...
...
@@ -44,6 +44,21 @@ struct TapeDaemonConfig {
*/
ProcessForkerConfig
processForkerConfig
;
/**
* The network name of the host on which the cupv daemon is running.
*/
std
::
string
cupvHost
;
/**
* The network name of the host on which the vdqm daemon is running.
*/
std
::
string
vdqmHost
;
/**
* The network name of the host on which the vmgr host is running.
*/
std
::
string
vmgrHost
;
/**
* The maximum time in seconds that the data-transfer session can take to get
* the transfer job from the client.
...
...
castor/tape/tapeserver/daemon/TapeDaemonMain.cpp
View file @
68e267a7
...
...
@@ -110,13 +110,10 @@ static void logTpconfigLine(castor::log::Logger &log,
static
int
exceptionThrowingMain
(
const
int
argc
,
char
**
const
argv
,
castor
::
log
::
Logger
&
log
)
{
using
namespace
castor
;
common
::
CastorConfiguration
&
config
=
common
::
CastorConfiguration
::
getConfig
();
const
std
::
string
cupvHost
=
config
.
getConfEntString
(
"UPV"
,
"HOST"
,
&
log
);
const
std
::
string
vdqmHost
=
config
.
getConfEntString
(
"VDQM"
,
"HOST"
,
&
log
);
const
std
::
string
vmgrHost
=
config
.
getConfEntString
(
"VMGR"
,
"HOST"
,
&
log
);
// Parse /etc/castor/castor.conf
const
tape
::
tapeserver
::
daemon
::
TapeDaemonConfig
tapeDaemonConfig
=
tape
::
tapeserver
::
daemon
::
TapeDaemonConfig
::
createFromCastorConf
(
&
log
);
// Parse /etc/castor/TPCONFIG
const
tape
::
utils
::
TpconfigLines
tpconfigLines
=
...
...
@@ -127,9 +124,12 @@ static int exceptionThrowingMain(const int argc, char **const argv,
// Create proxy objects for the vdqm, vmgr and rmc daemons
const
int
netTimeout
=
10
;
// Timeout in seconds
legacymsg
::
CupvProxyTcpIp
cupv
(
log
,
cupvHost
,
CUPV_PORT
,
netTimeout
);
legacymsg
::
VdqmProxyTcpIp
vdqm
(
log
,
vdqmHost
,
VDQM_PORT
,
netTimeout
);
legacymsg
::
VmgrProxyTcpIp
vmgr
(
vmgrHost
,
VMGR_PORT
,
netTimeout
);
legacymsg
::
CupvProxyTcpIp
cupv
(
log
,
tapeDaemonConfig
.
cupvHost
,
CUPV_PORT
,
netTimeout
);
legacymsg
::
VdqmProxyTcpIp
vdqm
(
log
,
tapeDaemonConfig
.
vdqmHost
,
VDQM_PORT
,
netTimeout
);
legacymsg
::
VmgrProxyTcpIp
vmgr
(
tapeDaemonConfig
.
vmgrHost
,
VMGR_PORT
,
netTimeout
);
tape
::
reactor
::
ZMQReactor
reactor
(
log
);
...
...
@@ -149,7 +149,8 @@ static int exceptionThrowingMain(const int argc, char **const argv,
vdqm
,
vmgr
,
reactor
,
capUtils
);
capUtils
,
tapeDaemonConfig
);
// Run the tapeserverd daemon
return
daemon
.
main
();
...
...
castor/tape/tapeserver/daemon/TapeDaemonTest.cpp
View file @
68e267a7
...
...
@@ -91,9 +91,11 @@ TEST_F(castor_tape_tapeserver_daemon_TapeDaemonTest, constructor) {
castor
::
legacymsg
::
VmgrProxyDummy
vmgr
;
castor
::
tape
::
reactor
::
ZMQReactor
reactor
(
log
);
castor
::
server
::
ProcessCapDummy
capUtils
;
TapeDaemonConfig
tapeDaemonConfig
;
std
::
auto_ptr
<
TapeDaemon
>
daemon
;
ASSERT_NO_THROW
(
daemon
.
reset
(
new
TapeDaemon
(
argc
,
argv
,
stdOut
,
stdErr
,
log
,
netTimeout
,
driveConfigs
,
cupv
,
vdqm
,
vmgr
,
reactor
,
capUtils
)));
netTimeout
,
driveConfigs
,
cupv
,
vdqm
,
vmgr
,
reactor
,
capUtils
,
tapeDaemonConfig
)));
}
}
// namespace unitTests
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment