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
ab418303
Commit
ab418303
authored
Jun 25, 2014
by
David COME
Browse files
MountSession renamed in DataTransferSession
parent
6ad8bfad
Changes
19
Hide whitespace changes
Inline
Side-by-side
castor/legacymsg/VdqmProxy.hpp
View file @
ab418303
...
...
@@ -46,7 +46,7 @@ namespace legacymsg {
* |<--------------------------------| |
* | | |
* | fork | |
* |----------->
Mount
Session | |
* |----------->
DataTransfer
Session | |
* | | | |
* | | assignDrive | |
* | |-------------->| |
...
...
castor/tape/rmc/RmcDaemon.cpp
View file @
ab418303
...
...
@@ -425,7 +425,7 @@ void castor::tape::rmc::RmcDaemon::forkChildProcess() throw() {
// Else if this is the parent process
} else if(0 < childPid) {
m_driveCatalogue.forked
Mount
Session(unitName, childPid);
m_driveCatalogue.forked
DataTransfer
Session(unitName, childPid);
// Else this is the child process
} else {
...
...
@@ -433,11 +433,11 @@ void castor::tape::rmc::RmcDaemon::forkChildProcess() throw() {
// file-descriptors owned by the event handlers
m_reactor.clear();
run
Mount
Session(unitName);
run
DataTransfer
Session(unitName);
// The run
Mount
Session() should call exit() and should therefore never
// The run
DataTransfer
Session() should call exit() and should therefore never
// return
m_log(LOG_ERR, "run
Mount
Session() returned unexpectedly");
m_log(LOG_ERR, "run
DataTransfer
Session() returned unexpectedly");
}
*/
}
castor/tape/tapeserver/client/ClientProxy.cpp
View file @
ab418303
...
...
@@ -101,7 +101,7 @@ tapegateway::GatewayMessage *
std
::
stringstream
mess
;
if
(
ret
->
mountTransactionId
()
!=
m_request
.
volReqId
)
{
mess
<<
"In castor::tape::server::clientInterface::requestResponseSession, "
"expected a information about
mount
SessionId="
<<
m_request
.
volReqId
"expected a information about
DataTransfer
SessionId="
<<
m_request
.
volReqId
<<
" and received: "
<<
ret
->
mountTransactionId
();
}
else
{
mess
<<
"In castor::tape::server::clientInterface::requestResponseSession, "
...
...
castor/tape/tapeserver/client/ClientProxyTest.cpp
View file @
ab418303
...
...
@@ -28,7 +28,7 @@
#include
"ClientProxy.hpp"
#include
"../threading/Threading.hpp"
#include
"castor/log/StringLogger.hpp"
#include
"castor/tape/tapeserver/daemon/
Mount
Session.hpp"
#include
"castor/tape/tapeserver/daemon/
DataTransfer
Session.hpp"
#include
"../system/Wrapper.hpp"
#include
"Ctape.h"
#include
"castor/tape/tapegateway/Volume.hpp"
...
...
castor/tape/tapeserver/daemon/CMakeLists.txt
View file @
ab418303
...
...
@@ -23,7 +23,7 @@ add_library(castorTapeServerDaemon
MigrationMemoryManager.cpp
MigrationReportPacker.cpp
MigrationTaskInjector.cpp
Mount
Session.cpp
DataTransfer
Session.cpp
RecallMemoryManager.cpp
RecallTaskInjector.cpp
RecallReportPacker.cpp
...
...
castor/tape/tapeserver/daemon/
Mount
Session.cpp
→
castor/tape/tapeserver/daemon/
DataTransfer
Session.cpp
View file @
ab418303
/******************************************************************************
*
Mount
Session.cpp
*
DataTransfer
Session.cpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
...
...
@@ -24,7 +24,7 @@
#include
<memory>
#include
"castor/tape/tapeserver/daemon/
Mount
Session.hpp"
#include
"castor/tape/tapeserver/daemon/
DataTransfer
Session.hpp"
#include
"castor/log/LogContext.hpp"
#include
"castor/tape/tapeserver/exception/Exception.hpp"
#include
"castor/tape/tapeserver/client/ClientProxy.hpp"
...
...
@@ -44,14 +44,14 @@
#include
"castor/tape/tapeserver/daemon/GlobalStatusReporter.hpp"
#include
"castor/tape/tapeserver/daemon/TapeReadSingleThread.hpp"
#include
"castor/tape/tapeserver/daemon/CapabilityUtils.hpp"
#include
"castor/tape/tapeserver/daemon/
Mount
Session.hpp"
#include
"castor/tape/tapeserver/daemon/
DataTransfer
Session.hpp"
using
namespace
castor
::
tape
;
using
namespace
castor
::
log
;
//------------------------------------------------------------------------------
//Constructor
//------------------------------------------------------------------------------
castor
::
tape
::
tapeserver
::
daemon
::
MountSession
::
Mount
Session
(
castor
::
tape
::
tapeserver
::
daemon
::
DataTransferSession
::
DataTransfer
Session
(
int
argc
,
char
**
argv
,
const
std
::
string
&
hostname
,
...
...
@@ -77,7 +77,7 @@ castor::tape::tapeserver::daemon::MountSession::MountSession(
}
//------------------------------------------------------------------------------
//
Mount
Session::execute
//
DataTransfer
Session::execute
//------------------------------------------------------------------------------
/**
* Function's synopsis
...
...
@@ -87,7 +87,7 @@ castor::tape::tapeserver::daemon::MountSession::MountSession(
* 2b) Log The result
* Then branch to the right execution
*/
int
castor
::
tape
::
tapeserver
::
daemon
::
Mount
Session
::
execute
()
int
castor
::
tape
::
tapeserver
::
daemon
::
DataTransfer
Session
::
execute
()
{
// 1) Prepare the logging environment
LogContext
lc
(
m_logger
);
...
...
@@ -171,9 +171,9 @@ int castor::tape::tapeserver::daemon::MountSession::execute()
}
}
//------------------------------------------------------------------------------
//
Mount
Session::executeRead
//
DataTransfer
Session::executeRead
//------------------------------------------------------------------------------
int
castor
::
tape
::
tapeserver
::
daemon
::
Mount
Session
::
executeRead
(
LogContext
&
lc
)
{
int
castor
::
tape
::
tapeserver
::
daemon
::
DataTransfer
Session
::
executeRead
(
LogContext
&
lc
)
{
// We are ready to start the session. We need to create the whole machinery
// in order to get the task injector ready to check if we actually have a
// file to recall.
...
...
@@ -250,9 +250,9 @@ int castor::tape::tapeserver::daemon::MountSession::executeRead(LogContext & lc)
}
}
//------------------------------------------------------------------------------
//
Mount
Session::executeWrite
//
DataTransfer
Session::executeWrite
//------------------------------------------------------------------------------
int
castor
::
tape
::
tapeserver
::
daemon
::
Mount
Session
::
executeWrite
(
LogContext
&
lc
)
{
int
castor
::
tape
::
tapeserver
::
daemon
::
DataTransfer
Session
::
executeWrite
(
LogContext
&
lc
)
{
// We are ready to start the session. We need to create the whole machinery
// in order to get the task injector ready to check if we actually have a
// file to migrate.
...
...
@@ -341,9 +341,9 @@ int castor::tape::tapeserver::daemon::MountSession::executeWrite(LogContext & lc
}
}
//------------------------------------------------------------------------------
//
Mount
Session::executeDump
//
DataTransfer
Session::executeDump
//------------------------------------------------------------------------------
void
castor
::
tape
::
tapeserver
::
daemon
::
Mount
Session
::
executeDump
(
LogContext
&
lc
)
{
void
castor
::
tape
::
tapeserver
::
daemon
::
DataTransfer
Session
::
executeDump
(
LogContext
&
lc
)
{
// We are ready to start the session. In case of read there is no interest in
// creating the machinery before getting the tape mounted, so do it now.
// 1) Get hold of the drive and check it.
...
...
@@ -351,7 +351,7 @@ void castor::tape::tapeserver::daemon::MountSession::executeDump(LogContext & lc
}
//------------------------------------------------------------------------------
//
Mount
Session::findDrive
//
DataTransfer
Session::findDrive
//------------------------------------------------------------------------------
/*
* Function synopsis :
...
...
@@ -367,7 +367,7 @@ void castor::tape::tapeserver::daemon::MountSession::executeDump(LogContext & lc
* @return the drive if found, NULL otherwise
*/
castor
::
tape
::
drives
::
DriveInterface
*
castor
::
tape
::
tapeserver
::
daemon
::
Mount
Session
::
findDrive
(
const
utils
::
DriveConfig
castor
::
tape
::
tapeserver
::
daemon
::
DataTransfer
Session
::
findDrive
(
const
utils
::
DriveConfig
&
driveConfig
,
LogContext
&
lc
)
{
// Find the drive in the system's SCSI devices
castor
::
tape
::
SCSI
::
DeviceVector
dv
(
m_sysWrapper
);
...
...
@@ -471,16 +471,16 @@ castor::tape::tapeserver::daemon::MountSession::findDrive(const utils::DriveConf
}
//------------------------------------------------------------------------------
//
Mount
Session::ctx
//
DataTransfer
Session::ctx
//------------------------------------------------------------------------------
zmq
::
context_t
&
castor
::
tape
::
tapeserver
::
daemon
::
Mount
Session
::
ctx
(){
zmq
::
context_t
&
castor
::
tape
::
tapeserver
::
daemon
::
DataTransfer
Session
::
ctx
(){
static
zmq
::
context_t
m_ctx
;
return
m_ctx
;
}
//------------------------------------------------------------------------------
//destructor
//------------------------------------------------------------------------------
castor
::
tape
::
tapeserver
::
daemon
::
MountSession
::~
Mount
Session
(){
castor
::
tape
::
tapeserver
::
daemon
::
DataTransferSession
::~
DataTransfer
Session
(){
ctx
().
close
();
}
castor/tape/tapeserver/daemon/
Mount
Session.hpp
→
castor/tape/tapeserver/daemon/
DataTransfer
Session.hpp
View file @
ab418303
/******************************************************************************
*
Mount
Session.hpp
*
DataTransfer
Session.hpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
...
...
@@ -52,7 +52,7 @@ namespace daemon {
* by the master process. It will drive a separate process. Only the sub
* process interface is not included here to allow testability.
*/
class
Mount
Session
{
class
DataTransfer
Session
{
public:
/** Subclass holding all the contents from castor.conf file. The pre-
* extraction of the contents by the caller instead of direct getconfent
...
...
@@ -98,7 +98,7 @@ namespace daemon {
uint32_t
tapeserverdDiskThreads
;
};
/** Constructor */
Mount
Session
(
DataTransfer
Session
(
int
argc
,
char
**
argv
,
const
std
::
string
&
hostname
,
...
...
@@ -122,7 +122,7 @@ namespace daemon {
*/
static
zmq
::
context_t
&
ctx
();
~
Mount
Session
();
~
DataTransfer
Session
();
private:
legacymsg
::
RtcpJobRqstMsgBody
m_request
;
castor
::
log
::
Logger
&
m_logger
;
...
...
castor/tape/tapeserver/daemon/
Mount
SessionTest.cpp
→
castor/tape/tapeserver/daemon/
DataTransfer
SessionTest.cpp
View file @
ab418303
...
...
@@ -33,7 +33,7 @@
#include
"castor/tape/tapeserver/daemon/CapabilityUtilsDummy.hpp"
#include
"../threading/Threading.hpp"
#include
"castor/log/StringLogger.hpp"
#include
"
Mount
Session.hpp"
#include
"
DataTransfer
Session.hpp"
#include
"../system/Wrapper.hpp"
#include
"Ctape.h"
#include
"castor/tape/tapegateway/Volume.hpp"
...
...
@@ -71,7 +71,7 @@ private:
TEST
(
tapeServer
,
Mount
SessionGooddayRecall
)
{
TEST
(
tapeServer
,
DataTransfer
SessionGooddayRecall
)
{
// TpcpClients only supports 32 bits session number
// This number has to be less than 2^31 as in addition there is a mix
// of signed and unsigned numbers
...
...
@@ -157,7 +157,7 @@ TEST(tapeServer, MountSessionGooddayRecall) {
driveConfig
.
densities
.
push_back
(
"5000GC"
);
driveConfig
.
librarySlot
=
"manual"
;
driveConfig
.
devType
=
"T10000"
;
Mount
Session
::
CastorConf
castorConf
;
DataTransfer
Session
::
CastorConf
castorConf
;
castorConf
.
rtcopydBufsz
=
1024
*
1024
;
// 1 MB memory buffers
castorConf
.
rtcopydNbBufs
=
10
;
castorConf
.
tapebridgeBulkRequestRecallMaxBytes
=
UINT64_C
(
100
)
*
1000
*
1000
*
1000
;
...
...
@@ -177,7 +177,7 @@ TEST(tapeServer, MountSessionGooddayRecall) {
argv_ctn_str
.
find_first_of
(
"
\0
"
,
pos
);
}
}
Mount
Session
sess
(
argc
,
argv
,
"tapeHost"
,
VDQMjob
,
logger
,
mockSys
,
DataTransfer
Session
sess
(
argc
,
argv
,
"tapeHost"
,
VDQMjob
,
logger
,
mockSys
,
driveConfig
,
rmc
,
initialProcess
,
capUtils
,
castorConf
);
sess
.
execute
();
simRun
.
wait
();
...
...
@@ -187,7 +187,7 @@ TEST(tapeServer, MountSessionGooddayRecall) {
}
TEST
(
tapeServer
,
Mount
SessionNoSuchDrive
)
{
TEST
(
tapeServer
,
DataTransfer
SessionNoSuchDrive
)
{
// TpcpClients only supports 32 bits session number
// This number has to be less than 2^31 as in addition there is a mix
// of signed and unsigned numbers
...
...
@@ -226,7 +226,7 @@ TEST(tapeServer, MountSessionNoSuchDrive) {
driveConfig
.
densities
.
push_back
(
"5000GC"
);
driveConfig
.
librarySlot
=
"manual"
;
driveConfig
.
devType
=
"T10000"
;
Mount
Session
::
CastorConf
castorConf
;
DataTransfer
Session
::
CastorConf
castorConf
;
castorConf
.
rtcopydBufsz
=
1024
;
castorConf
.
rtcopydNbBufs
=
10
;
castor
::
legacymsg
::
VmgrProxyDummy
vmgr
;
...
...
@@ -245,7 +245,7 @@ TEST(tapeServer, MountSessionNoSuchDrive) {
argv_ctn_str
.
find_first_of
(
"
\0
"
,
pos
);
}
}
Mount
Session
sess
(
argc
,
argv
,
"tapeHost"
,
VDQMjob
,
logger
,
mockSys
,
DataTransfer
Session
sess
(
argc
,
argv
,
"tapeHost"
,
VDQMjob
,
logger
,
mockSys
,
driveConfig
,
rmc
,
initialProcess
,
capUtils
,
castorConf
);
sess
.
execute
();
simRun
.
wait
();
...
...
@@ -310,7 +310,7 @@ struct expectedResult {
uint32_t
checksum
;
};
TEST
(
tapeServer
,
Mount
SessionGooddayMigration
)
{
TEST
(
tapeServer
,
DataTransfer
SessionGooddayMigration
)
{
// TpcpClients only supports 32 bits session number
// This number has to be less than 2^31 as in addition there is a mix
// of signed and unsigned numbers
...
...
@@ -378,7 +378,7 @@ TEST(tapeServer, MountSessionGooddayMigration) {
driveConfig
.
densities
.
push_back
(
"5000GC"
);
driveConfig
.
librarySlot
=
"manual"
;
driveConfig
.
devType
=
"T10000"
;
Mount
Session
::
CastorConf
castorConf
;
DataTransfer
Session
::
CastorConf
castorConf
;
castorConf
.
rtcopydBufsz
=
1024
*
1024
;
// 1 MB memory buffers
castorConf
.
rtcopydNbBufs
=
10
;
castorConf
.
tapebridgeBulkRequestMigrationMaxBytes
=
UINT64_C
(
100
)
*
1000
*
1000
*
1000
;
...
...
@@ -400,7 +400,7 @@ TEST(tapeServer, MountSessionGooddayMigration) {
argv_ctn_str
.
find_first_of
(
"
\0
"
,
pos
);
}
}
Mount
Session
sess
(
argc
,
argv
,
"tapeHost"
,
VDQMjob
,
logger
,
mockSys
,
DataTransfer
Session
sess
(
argc
,
argv
,
"tapeHost"
,
VDQMjob
,
logger
,
mockSys
,
driveConfig
,
rmc
,
initialProcess
,
capUtils
,
castorConf
);
sess
.
execute
();
simRun
.
wait
();
...
...
castor/tape/tapeserver/daemon/DriveCatalogueEntry.cpp
View file @
ab418303
...
...
@@ -483,9 +483,9 @@ void castor::tape::tapeserver::daemon::DriveCatalogueEntry::receivedLabelJob(
}
//-----------------------------------------------------------------------------
// forked
Mount
Session
// forked
DataTransfer
Session
//-----------------------------------------------------------------------------
void
castor
::
tape
::
tapeserver
::
daemon
::
DriveCatalogueEntry
::
forked
Mount
Session
(
void
castor
::
tape
::
tapeserver
::
daemon
::
DriveCatalogueEntry
::
forked
DataTransfer
Session
(
const
pid_t
sessionPid
)
{
std
::
ostringstream
task
;
task
<<
"handle fork of mount session for tape drive "
<<
m_config
.
unitName
;
...
...
castor/tape/tapeserver/daemon/DriveCatalogueEntry.hpp
View file @
ab418303
...
...
@@ -328,7 +328,7 @@ public:
* @param sessionPid The process ID of the child process responsible for
* running the mount session.
*/
void
forked
Mount
Session
(
const
pid_t
sessionPid
);
void
forked
DataTransfer
Session
(
const
pid_t
sessionPid
);
/**
* Moves the state of the tape drive to DRIVE_STATE_RUNNING.
...
...
castor/tape/tapeserver/daemon/DriveCatalogueTest.cpp
View file @
ab418303
...
...
@@ -193,7 +193,7 @@ TEST_F(castor_tape_tapeserver_daemon_DriveCatalogueTest, completeFSTN) {
// Fork the mount session
const
pid_t
sessionPid
=
1234
;
ASSERT_NO_THROW
(
unit
->
forked
Mount
Session
(
sessionPid
));
ASSERT_NO_THROW
(
unit
->
forked
DataTransfer
Session
(
sessionPid
));
ASSERT_EQ
(
castor
::
tape
::
tapeserver
::
daemon
::
DriveCatalogueSession
::
SESSION_STATE_RUNNING
,
unit
->
getSessionState
());
ASSERT_EQ
(
sessionPid
,
unit
->
getSessionPid
());
...
...
castor/tape/tapeserver/daemon/MigrationTaskInjector.hpp
View file @
ab418303
...
...
@@ -202,7 +202,7 @@ private:
* IT is computed by subtracting 1 to fSeg of the first file to migrate we
* receive. That part is done by the
* MigrationTaskInjector.::synchronousInjection. Thus, we compute it into
* that function and retrieve/set it within
Mount
Session executeWrite
* that function and retrieve/set it within
DataTransfer
Session executeWrite
* after we make sure synchronousInjection returned true. To do so, we
* need to store it
*/
...
...
castor/tape/tapeserver/daemon/TapeDaemon.cpp
View file @
ab418303
...
...
@@ -33,7 +33,7 @@
#include
"castor/tape/tapeserver/daemon/Constants.hpp"
#include
"castor/tape/tapeserver/daemon/LabelCmdAcceptHandler.hpp"
#include
"castor/tape/tapeserver/daemon/LabelSession.hpp"
#include
"castor/tape/tapeserver/daemon/
Mount
Session.hpp"
#include
"castor/tape/tapeserver/daemon/
DataTransfer
Session.hpp"
#include
"castor/tape/tapeserver/daemon/TapeDaemon.hpp"
#include
"castor/tape/tapeserver/daemon/TapeMessageHandler.hpp"
#include
"castor/tape/tapeserver/daemon/VdqmAcceptHandler.hpp"
...
...
@@ -443,7 +443,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::
//------------------------------------------------------------------------------
void
castor
::
tape
::
tapeserver
::
daemon
::
TapeDaemon
::
mainEventLoop
()
{
while
(
handleEvents
())
{
fork
Mount
Sessions
();
fork
DataTransfer
Sessions
();
forkLabelSessions
();
}
}
...
...
@@ -745,23 +745,23 @@ void castor::tape::tapeserver::daemon::TapeDaemon::postProcessReapedLabelSession
}
//------------------------------------------------------------------------------
// fork
Mount
Sessions
// fork
DataTransfer
Sessions
//------------------------------------------------------------------------------
void
castor
::
tape
::
tapeserver
::
daemon
::
TapeDaemon
::
fork
Mount
Sessions
()
throw
()
{
void
castor
::
tape
::
tapeserver
::
daemon
::
TapeDaemon
::
fork
DataTransfer
Sessions
()
throw
()
{
const
std
::
list
<
std
::
string
>
unitNames
=
m_driveCatalogue
.
getUnitNamesWaitingForTransferFork
();
for
(
std
::
list
<
std
::
string
>::
const_iterator
itor
=
unitNames
.
begin
();
itor
!=
unitNames
.
end
();
itor
++
)
{
const
std
::
string
unitName
=
*
itor
;
DriveCatalogueEntry
*
drive
=
m_driveCatalogue
.
findDrive
(
unitName
);
fork
Mount
Session
(
drive
);
fork
DataTransfer
Session
(
drive
);
}
}
//------------------------------------------------------------------------------
// fork
Mount
Session
// fork
DataTransfer
Session
//------------------------------------------------------------------------------
void
castor
::
tape
::
tapeserver
::
daemon
::
TapeDaemon
::
fork
Mount
Session
(
void
castor
::
tape
::
tapeserver
::
daemon
::
TapeDaemon
::
fork
DataTransfer
Session
(
DriveCatalogueEntry
*
drive
)
throw
()
{
const
utils
::
DriveConfig
&
driveConfig
=
drive
->
getConfig
();
...
...
@@ -783,7 +783,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::forkMountSession(
// Else if this is the parent process
}
else
if
(
0
<
forkRc
)
{
drive
->
forked
Mount
Session
(
forkRc
);
drive
->
forked
DataTransfer
Session
(
forkRc
);
return
;
// Else this is the child process
...
...
@@ -805,14 +805,14 @@ void castor::tape::tapeserver::daemon::TapeDaemon::forkMountSession(
params
);
}
run
Mount
Session
(
drive
);
run
DataTransfer
Session
(
drive
);
}
}
//------------------------------------------------------------------------------
// run
Mount
Session
// run
DataTransfer
Session
//------------------------------------------------------------------------------
void
castor
::
tape
::
tapeserver
::
daemon
::
TapeDaemon
::
run
Mount
Session
(
void
castor
::
tape
::
tapeserver
::
daemon
::
TapeDaemon
::
run
DataTransfer
Session
(
const
DriveCatalogueEntry
*
drive
)
throw
()
{
const
utils
::
DriveConfig
&
driveConfig
=
drive
->
getConfig
();
const
pid_t
sessionPid
=
getpid
();
...
...
@@ -824,10 +824,10 @@ void castor::tape::tapeserver::daemon::TapeDaemon::runMountSession(
m_log
(
LOG_INFO
,
"Mount-session child-process started"
,
params
);
try
{
Mount
Session
::
CastorConf
castorConf
;
DataTransfer
Session
::
CastorConf
castorConf
;
// This try bloc will allow us to send a failure notification to the client
// if we fail before the
Mount
Session has an opportunity to do so.
std
::
auto_ptr
<
MountSession
>
mount
Session
;
// if we fail before the
DataTransfer
Session has an opportunity to do so.
std
::
auto_ptr
<
DataTransferSession
>
dataTransfer
Session
;
castor
::
tape
::
System
::
realWrapper
sysWrapper
;
std
::
auto_ptr
<
legacymsg
::
RmcProxy
>
rmc
;
std
::
auto_ptr
<
messages
::
TapeserverProxy
>
tapeserver
;
...
...
@@ -863,12 +863,12 @@ void castor::tape::tapeserver::daemon::TapeDaemon::runMountSession(
rmc
.
reset
(
m_rmcFactory
.
create
());
try
{
tapeserver
.
reset
(
m_tapeserverFactory
.
create
(
Mount
Session
::
ctx
()));
tapeserver
.
reset
(
m_tapeserverFactory
.
create
(
DataTransfer
Session
::
ctx
()));
}
catch
(
const
std
::
exception
&
e
){
m_log
(
LOG_ERR
,
"Failed to connect ZMQ/REQ socket in
Mount
Session"
);
m_log
(
LOG_ERR
,
"Failed to connect ZMQ/REQ socket in
DataTransfer
Session"
);
}
mount
Session
.
reset
(
new
Mount
Session
(
dataTransfer
Session
.
reset
(
new
DataTransfer
Session
(
m_argc
,
m_argv
,
m_hostName
,
...
...
@@ -911,8 +911,7 @@ void castor::tape::tapeserver::daemon::TapeDaemon::runMountSession(
throw
;
}
m_log
(
LOG_INFO
,
"Going to execute Mount Session"
);
int
result
=
mountSession
->
execute
();
// MountSession::ctx().close();
int
result
=
dataTransferSession
->
execute
();
exit
(
result
);
}
catch
(
castor
::
exception
::
Exception
&
ex
)
{
params
.
push_back
(
log
::
Param
(
"message"
,
ex
.
getMessageValue
()));
...
...
castor/tape/tapeserver/daemon/TapeDaemon.hpp
View file @
ab418303
...
...
@@ -304,14 +304,14 @@ protected:
* call to m_reactor.handleEvents() handled requests to start a mount
* session on more than one of the connected tape drives.
*/
void
fork
Mount
Sessions
()
throw
();
void
fork
DataTransfer
Sessions
()
throw
();
/**
* Forks a mount-session child-process for the specified tape drive.
*
* @param drive The tape-drive entry in the tape-drive catalogue.
*/
void
fork
Mount
Session
(
DriveCatalogueEntry
*
drive
)
throw
();
void
fork
DataTransfer
Session
(
DriveCatalogueEntry
*
drive
)
throw
();
/**
* Runs the mount session. This method is to be called within the child
...
...
@@ -320,7 +320,7 @@ protected:
* @param drive The catalogue entry of the tape drive to be used during the
* session.
*/
void
run
Mount
Session
(
const
DriveCatalogueEntry
*
drive
)
throw
();
void
run
DataTransfer
Session
(
const
DriveCatalogueEntry
*
drive
)
throw
();
/**
* Forks a label-session child-process for every tape drive entry in the
...
...
castor/tape/tapeserver/daemon/TapeDaemonMain.cpp
View file @
ab418303
...
...
@@ -32,7 +32,7 @@
#include
"castor/tape/reactor/ZMQReactor.hpp"
#include
"castor/tape/tapeserver/daemon/CapabilityUtilsImpl.hpp"
#include
"castor/tape/tapeserver/daemon/Constants.hpp"
#include
"castor/tape/tapeserver/daemon/
Mount
Session.hpp"
#include
"castor/tape/tapeserver/daemon/
DataTransfer
Session.hpp"
#include
"castor/tape/tapeserver/daemon/TapeDaemon.hpp"
#include
"castor/utils/utils.hpp"
#include
"h/rmc_constants.h"
...
...
castor/tape/tapeserver/daemon/TapeWriteSingleThread.hpp
View file @
ab418303
...
...
@@ -261,7 +261,7 @@ private:
* of our session. The last Fseq is computed by subtracting 1 to fSeg
* of the first file to migrate we receive. That part is done by the
* MigrationTaskInjector.::synchronousInjection. Thus, we compute it into
* that function and retrieve/set it within
Mount
Session executeWrite
* that function and retrieve/set it within
DataTransfer
Session executeWrite
* after we make sure synchronousInjection returned true.
*
* It should be const, but it cant
...
...
castor/tape/tapeserver/daemon/TaskWatchDog.cpp
View file @
ab418303
...
...
@@ -29,7 +29,7 @@
#include
"castor/messages/messages.hpp"
#include
"castor/utils/utils.hpp"
#include
"castor/tape/tapeserver/daemon/Constants.hpp"
#include
"castor/tape/tapeserver/daemon/
Mount
Session.hpp"
#include
"castor/tape/tapeserver/daemon/
DataTransfer
Session.hpp"
namespace
castor
{
...
...
@@ -71,7 +71,7 @@ void TaskWatchDog::report(zmq::socket_t& m_socket){
}
void
TaskWatchDog
::
run
(){
zmq
::
socket_t
m_socket
(
Mount
Session
::
ctx
(),
ZMQ_REQ
);
zmq
::
socket_t
m_socket
(
DataTransfer
Session
::
ctx
(),
ZMQ_REQ
);
castor
::
messages
::
connectToLocalhost
(
m_socket
);
using
castor
::
utils
::
timevalToDouble
;
...
...
castor/tape/utils/DriveConfigMapTest.cpp
View file @
ab418303
...
...
@@ -305,7 +305,7 @@ TEST_F(castor_tape_utils_DriveCatalogueTest, completeFSTN) {
// Fork the mount session
const
pid_t
sessionPid
=
1234
;
ASSERT_NO_THROW
(
catalogue
.
forked
Mount
Session
(
"UNIT"
,
sessionPid
));
ASSERT_NO_THROW
(
catalogue
.
forked
DataTransfer
Session
(
"UNIT"
,
sessionPid
));
ASSERT_EQ
(
DriveCatalogue
::
DRIVE_STATE_RUNNING
,
catalogue
.
getState
(
"UNIT"
));
ASSERT_EQ
(
sessionPid
,
catalogue
.
getSessionPid
(
"UNIT"
));
...
...
test/CMakeLists.txt
View file @
ab418303
...
...
@@ -214,7 +214,7 @@ target_link_libraries(castorUnitTests
add_executable
(
castorThreadedUnitTests
castorUnitTests.cpp
../castor/tape/tapeserver/threading/ThreadingMTTests.cpp
../castor/tape/tapeserver/daemon/
Mount
SessionTest.cpp
../castor/tape/tapeserver/daemon/
DataTransfer
SessionTest.cpp
../castor/tape/tapeserver/threading/ThreadingBlockingQTests.cpp
../castor/tape/tapeserver/daemon/CapabilityUtilsDummy.cpp
../castor/tape/tapeserver/daemon/RecallTaskInjectorTest.cpp
...
...
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