Commit 9f85a1eb authored by Daniele Kruse's avatar Daniele Kruse
Browse files

Introduced the scheduler to the DataTransferSession, replacing the concept of...

Introduced the scheduler to the DataTransferSession, replacing the concept of DGN with logical library
parent c7dc4c0b
......@@ -34,5 +34,5 @@ castor::legacymsg::TapeLabelRqstMsgBody::TapeLabelRqstMsgBody() throw():
gid(0) {
memset(vid, '\0', sizeof(vid));
memset(drive, '\0', sizeof(drive));
memset(dgn, '\0', sizeof(dgn));
memset(logicalLibrary, '\0', sizeof(logicalLibrary));
}
......@@ -38,7 +38,7 @@ struct TapeLabelRqstMsgBody {
uint32_t gid;
char vid[CA_MAXVIDLEN + 1];
char drive[CA_MAXUNMLEN + 1];
char dgn[CA_MAXDGNLEN + 1];
char logicalLibrary[CA_MAXDGNLEN + 1];
/**
* Constructor.
......
......@@ -150,7 +150,7 @@ TEST_F(castor_legacymsg_TapeMarshalTest, marshalTapeLabelRqstMsgBody) {
srcMsgBody.gid = 4;
castor::utils::copyString(srcMsgBody.vid, "VIDVID");
castor::utils::copyString(srcMsgBody.drive, "DRIVE001");
castor::utils::copyString(srcMsgBody.dgn, "DGNDGN");
castor::utils::copyString(srcMsgBody.logicalLibrary, "DGNDGN");
size_t bufLen = sizeof(buf);
size_t totalLen = 0; // Total length of message (header + body)
......@@ -188,7 +188,7 @@ TEST_F(castor_legacymsg_TapeMarshalTest, marshalTapeLabelRqstMsgBody) {
ASSERT_EQ((uint32_t)4, dstMsgBody.gid);
ASSERT_EQ(std::string("VIDVID"), dstMsgBody.vid);
ASSERT_EQ(std::string("DRIVE001"), dstMsgBody.drive);
ASSERT_EQ(std::string("DGNDGN"), dstMsgBody.dgn);
ASSERT_EQ(std::string("DGNDGN"), dstMsgBody.logicalLibrary);
}
}
......@@ -204,7 +204,7 @@ TEST_F(castor_legacymsg_TapeMarshalTest, marshalTapeStatReplyMsgBody) {
srcMsgBody.drives[0].asn = 1;
srcMsgBody.drives[0].asn_time = 2;
srcMsgBody.drives[0].cfseq = 3;
castor::utils::copyString(srcMsgBody.drives[0].dgn, "DGN000");
castor::utils::copyString(srcMsgBody.drives[0].logicalLibrary, "DGN000");
castor::utils::copyString(srcMsgBody.drives[0].drive, "DRIVE000");
srcMsgBody.drives[0].jid = 4;
castor::utils::copyString(srcMsgBody.drives[0].lblcode, "L00");
......@@ -218,7 +218,7 @@ TEST_F(castor_legacymsg_TapeMarshalTest, marshalTapeStatReplyMsgBody) {
srcMsgBody.drives[1].asn = 11;
srcMsgBody.drives[1].asn_time = 12;
srcMsgBody.drives[1].cfseq = 13;
castor::utils::copyString(srcMsgBody.drives[1].dgn, "DGN001");
castor::utils::copyString(srcMsgBody.drives[1].logicalLibrary, "DGN001");
castor::utils::copyString(srcMsgBody.drives[1].drive, "DRIVE001");
srcMsgBody.drives[1].jid = 14;
castor::utils::copyString(srcMsgBody.drives[1].lblcode, "L01");
......@@ -265,7 +265,7 @@ TEST_F(castor_legacymsg_TapeMarshalTest, marshalTapeStatReplyMsgBody) {
ASSERT_EQ((uint16_t)1, dstMsgBody.drives[0].asn);
ASSERT_EQ((uint32_t)2, dstMsgBody.drives[0].asn_time);
ASSERT_EQ((uint32_t)3, dstMsgBody.drives[0].cfseq);
ASSERT_EQ(std::string("DGN000"), dstMsgBody.drives[0].dgn);
ASSERT_EQ(std::string("DGN000"), dstMsgBody.drives[0].logicalLibrary);
ASSERT_EQ(std::string("DRIVE000"), dstMsgBody.drives[0].drive);
ASSERT_EQ((uint32_t)4, dstMsgBody.drives[0].jid);
ASSERT_EQ(std::string("L00"), dstMsgBody.drives[0].lblcode);
......@@ -279,7 +279,7 @@ TEST_F(castor_legacymsg_TapeMarshalTest, marshalTapeStatReplyMsgBody) {
ASSERT_EQ((uint16_t)11, dstMsgBody.drives[1].asn);
ASSERT_EQ((uint32_t)12, dstMsgBody.drives[1].asn_time);
ASSERT_EQ((uint32_t)13, dstMsgBody.drives[1].cfseq);
ASSERT_EQ(std::string("DGN001"), dstMsgBody.drives[1].dgn);
ASSERT_EQ(std::string("DGN001"), dstMsgBody.drives[1].logicalLibrary);
ASSERT_EQ(std::string("DRIVE001"), dstMsgBody.drives[1].drive);
ASSERT_EQ((uint32_t)14, dstMsgBody.drives[1].jid);
ASSERT_EQ(std::string("L01"), dstMsgBody.drives[1].lblcode);
......
......@@ -35,7 +35,7 @@ namespace legacymsg {
struct TapeStatDriveEntry {
uint32_t uid;
uint32_t jid; // process group id or session id
char dgn[CA_MAXDGNLEN+1]; // device group name
char logicalLibrary[CA_MAXDGNLEN+1]; // logical Library name
uint16_t up; // drive status: down = 0, up = 1
uint16_t asn; // assign flag: assigned = 1
uint32_t asn_time; // timestamp of drive assignment
......
......@@ -23,7 +23,7 @@ package castor.messages;
message ForkCleaner {
// Description of the tape drive
required string unitname = 1;
required string dgn = 2;
required string logicallibrary = 2;
required string devfilename = 3;
required string libraryslot = 4;
......
......@@ -23,7 +23,7 @@ package castor.messages;
message ForkDataTransfer {
// Description of the tape drive
required string unitname = 1;
required string dgn = 2;
required string logicallibrary = 2;
required string devfilename = 3;
required string libraryslot = 4;
}
......@@ -23,7 +23,7 @@ package castor.messages;
message ForkLabel {
// Description of the tape drive
required string unitname = 1;
required string dgn = 2;
required string logicallibrary = 2;
required string devfilename = 3;
required string libraryslot = 4;
......
......@@ -203,7 +203,7 @@ void castor::tape::tapeserver::daemon::AdminConnectionHandler::
log::Param params[] = {
log::Param("unitName", unitName),
log::Param("dgn", driveConfig.getDgn())};
log::Param("logicalLibrary", driveConfig.getLogicalLibrary())};
switch(body.status) {
case CONF_UP:
......
......@@ -23,6 +23,8 @@ include_directories(/usr/include/shift)
include_directories(${CMAKE_SOURCE_DIR}/tapeserver)
include_directories(${CMAKE_SOURCE_DIR}/tapeserver/h)
include_directories(${PROJECT_BINARY_DIR}/tapeserver)
include_directories(${CMAKE_SOURCE_DIR})
include_directories(${PROJECT_BINARY_DIR})
find_package( ZLIB REQUIRED )
......@@ -74,7 +76,7 @@ add_library(castorTapeServerDaemon
TpconfigLine.cpp
TpconfigLines.cpp)
target_link_libraries(castorTapeServerDaemon castormessages castortapereactor)
target_link_libraries(castorTapeServerDaemon castormessages castortapereactor ctascheduler ctacommon ctanameserver ctaremotens ctaOStoreSchedulerDB protobuf CTAObjectStore)
add_dependencies(castorTapeServerDaemon castormessagesprotobuf)
add_library(castorTapeServerDaemonTestDummies
......
......@@ -475,11 +475,11 @@ void castor::tape::tapeserver::daemon::CatalogueDrive::receivedLabelJob(
switch(m_state) {
case DRIVE_STATE_UP:
if(std::string(job.dgn) != m_config.getDgn()) {
if(std::string(job.logicalLibrary) != m_config.getLogicalLibrary()) {
castor::exception::Exception ex;
ex.getMessage() << "Failed to " << task.str() <<
": DGN mismatch: catalogueDgn=" << m_config.getDgn() << " labelJobDgn="
<< job.dgn;
": logicalLibrary mismatch: catalogueLogicalLibrary=" << m_config.getLogicalLibrary() << " labelJobDgn="
<< job.logicalLibrary;
throw ex;
}
m_session = CatalogueLabelSession::create(
......@@ -745,7 +745,7 @@ castor::legacymsg::TapeStatDriveEntry
try {
entry.uid = getUidForTapeStatDriveEntry();
entry.jid = getJidForTapeStatDriveEntry();
castor::utils::copyString(entry.dgn, m_config.getDgn());
castor::utils::copyString(entry.logicalLibrary, m_config.getLogicalLibrary());
entry.up = getUpForTapeStatDriveEntry();
entry.asn = getAsnForTapeStatDriveEntry();
entry.asn_time = getAsnTimeForTapeStatDriveEntry();
......
......@@ -79,7 +79,7 @@ TEST_F(castor_tape_tapeserver_daemon_CatalogueTest, goodDayPopulate) {
const CatalogueDrive &unit1 = catalogue.findDrive("UNIT1");
const DriveConfig &unit1Config = unit1.getConfig();
ASSERT_EQ(std::string("DGN1"), unit1Config.getDgn());
ASSERT_EQ(std::string("DGN1"), unit1Config.getLogicalLibrary());
ASSERT_EQ(std::string("DEV1"), unit1Config.getDevFilename());
ASSERT_EQ(DRIVE_STATE_DOWN, unit1.getState());
......@@ -95,7 +95,7 @@ TEST_F(castor_tape_tapeserver_daemon_CatalogueTest, goodDayPopulate) {
const CatalogueDrive &unit2 = catalogue.findDrive("UNIT2");
const DriveConfig &unit2Config = unit2.getConfig();
ASSERT_EQ(std::string("DGN2"), unit2Config.getDgn());
ASSERT_EQ(std::string("DGN2"), unit2Config.getLogicalLibrary());
ASSERT_EQ(std::string("DEV2"), unit2Config.getDevFilename());
ASSERT_EQ(DRIVE_STATE_DOWN, unit2.getState());
......
......@@ -38,6 +38,7 @@
#include "castor/tape/tapeserver/drive/DriveInterface.hpp"
#include "castor/tape/tapeserver/SCSI/Device.hpp"
#include "log.h"
#include "scheduler/TapeMount.hpp"
#include "serrno.h"
#include "stager_client_commandline.h"
......@@ -55,14 +56,17 @@ castor::tape::tapeserver::daemon::DataTransferSession::DataTransferSession(
castor::mediachanger::MediaChangerFacade & mc,
castor::messages::TapeserverProxy & initialProcess,
castor::server::ProcessCap & capUtils,
const DataTransferConfig & castorConf):
const DataTransferConfig & castorConf,
cta::Scheduler & scheduler):
m_log(log),
m_sysWrapper(sysWrapper),
m_driveConfig(driveConfig),
m_castorConf(castorConf),
m_mc(mc),
m_intialProcess(initialProcess),
m_capUtils(capUtils) {
m_capUtils(capUtils),
m_scheduler(scheduler)
{
}
//------------------------------------------------------------------------------
......@@ -85,6 +89,7 @@ castor::tape::tapeserver::daemon::Session::EndOfSessionAction
// 2a) Get initial information from the client
client::ClientProxy::RequestReport reqReport;
try {
std::unique_ptr<cta::TapeMount> tapeMount(m_scheduler.getNextMount("LLname", "DriveName")); //TODO: put right values of logical library and drive name
m_clientProxy.fetchVolumeId(m_volInfo, reqReport);
} catch(client::ClientProxy::EndOfSessionWithError & eoswe) {
std::stringstream fullError;
......
......@@ -34,6 +34,7 @@
#include "castor/tape/tapeserver/daemon/Session.hpp"
#include "castor/tape/tapeserver/daemon/TapeSingleThreadInterface.hpp"
#include "castor/tape/tapeserver/system/Wrapper.hpp"
#include "scheduler/Scheduler.hpp"
namespace castor {
namespace legacymsg {
......@@ -63,7 +64,8 @@ namespace daemon {
castor::mediachanger::MediaChangerFacade & mc,
castor::messages::TapeserverProxy & initialProcess,
castor::server::ProcessCap &capUtils,
const DataTransferConfig & castorConf);
const DataTransferConfig & castorConf,
cta::Scheduler &scheduler);
/**
* Execute the session and return the type of action to be performed
......@@ -131,6 +133,10 @@ namespace daemon {
castor::server::ProcessCap &m_capUtils;
/** hostname, used to report status of the drive */
const std::string m_hostname;
/**
* The scheduler, i.e. the local interface to the Objectstore DB
*/
cta::Scheduler &m_scheduler;
/**
* Returns the string representation of the specified tapebridge client type
......
......@@ -48,7 +48,11 @@
#include "castor/tape/tapeserver/file/File.hpp"
#include "castor/tape/tapeserver/drive/FakeDrive.hpp"
#include "Ctape.h"
#include "scheduler/Scheduler.hpp"
#include "smc_struct.h"
#include "nameserver/mockNS/MockNameServer.hpp"
#include "remotens/MockRemoteNS.hpp"
#include "scheduler/mockDB/MockSchedulerDatabase.hpp"
#include <fcntl.h>
#include <sys/mman.h>
......@@ -154,8 +158,12 @@ TEST(tapeServer, DataTransferSessionGooddayRecall) {
castor::mediachanger::MediaChangerFacade mc(acs, mmc, rmc);
castor::server::ProcessCap capUtils;
castor::messages::TapeserverProxyDummy initialProcess;
cta::MockNameServer ns;
cta::MockRemoteNS rns;
cta::MockSchedulerDatabase db;
cta::Scheduler scheduler(ns, db, rns);
DataTransferSession sess("tapeHost", logger, mockSys,
driveConfig, mc, initialProcess, capUtils, castorConf);
driveConfig, mc, initialProcess, capUtils, castorConf, scheduler);
sess.execute();
simRun.wait();
std::string temp = logger.getLog();
......@@ -246,8 +254,12 @@ TEST(tapeServer, DataTransferSessionWrongRecall) {
castor::mediachanger::MediaChangerFacade mc(acs, mmc, rmc);
castor::server::ProcessCap capUtils;
castor::messages::TapeserverProxyDummy initialProcess;
cta::MockNameServer ns;
cta::MockRemoteNS rns;
cta::MockSchedulerDatabase db;
cta::Scheduler scheduler(ns, db, rns);
DataTransferSession sess("tapeHost", logger, mockSys,
driveConfig, mc, initialProcess, capUtils, castorConf);
driveConfig, mc, initialProcess, capUtils, castorConf, scheduler);
sess.execute();
simRun.wait();
std::string temp = logger.getLog();
......@@ -288,8 +300,12 @@ TEST(tapeServer, DataTransferSessionNoSuchDrive) {
castor::mediachanger::MediaChangerFacade mc(acs, mmc, rmc);
castor::messages::TapeserverProxyDummy initialProcess;
castor::server::ProcessCapDummy capUtils;
cta::MockNameServer ns;
cta::MockRemoteNS rns;
cta::MockSchedulerDatabase db;
cta::Scheduler scheduler(ns, db, rns);
DataTransferSession sess("tapeHost", logger, mockSys,
driveConfig, mc, initialProcess, capUtils, castorConf);
driveConfig, mc, initialProcess, capUtils, castorConf, scheduler);
sess.execute();
simRun.wait();
std::string temp = logger.getLog();
......@@ -364,8 +380,12 @@ TEST(tapeServer, DataTransferSessionFailtoMount) {
castor::mediachanger::MediaChangerFacade mc(acs, mmc, rmc);
castor::server::ProcessCap capUtils;
castor::messages::TapeserverProxyDummy initialProcess;
cta::MockNameServer ns;
cta::MockRemoteNS rns;
cta::MockSchedulerDatabase db;
cta::Scheduler scheduler(ns, db, rns);
DataTransferSession sess("tapeHost", logger, mockSys,
driveConfig, mc, initialProcess, capUtils, castorConf);
driveConfig, mc, initialProcess, capUtils, castorConf, scheduler);
sess.execute();
simRun.wait();
std::string temp = logger.getLog();
......@@ -415,8 +435,12 @@ TEST(tapeServer, DataTransferSessionEmptyOnVolReq) {
castor::mediachanger::MediaChangerFacade mc(acs, mmc, rmc);
castor::server::ProcessCap capUtils;
castor::messages::TapeserverProxyDummy initialProcess;
cta::MockNameServer ns;
cta::MockRemoteNS rns;
cta::MockSchedulerDatabase db;
cta::Scheduler scheduler(ns, db, rns);
DataTransferSession sess("tapeHost", logger, mockSys,
driveConfig, mc, initialProcess, capUtils, castorConf);
driveConfig, mc, initialProcess, capUtils, castorConf, scheduler);
sess.execute();
simRun.wait();
std::string temp = logger.getLog();
......@@ -550,8 +574,12 @@ TEST(tapeServer, DataTransferSessionGooddayMigration) {
castor::mediachanger::MediaChangerFacade mc(acs, mmc, rmc);
castor::messages::TapeserverProxyDummy initialProcess;
castor::server::ProcessCapDummy capUtils;
cta::MockNameServer ns;
cta::MockRemoteNS rns;
cta::MockSchedulerDatabase db;
cta::Scheduler scheduler(ns, db, rns);
DataTransferSession sess("tapeHost", logger, mockSys,
driveConfig, mc, initialProcess, capUtils, castorConf);
driveConfig, mc, initialProcess, capUtils, castorConf, scheduler);
sess.execute();
simRun.wait();
for (std::vector<struct expectedResult>::iterator i = expected.begin();
......@@ -625,8 +653,12 @@ TEST(tapeServer, DataTransferSessionMissingFilesMigration) {
castor::mediachanger::MediaChangerFacade mc(acs, mmc, rmc);
castor::messages::TapeserverProxyDummy initialProcess;
castor::server::ProcessCapDummy capUtils;
cta::MockNameServer ns;
cta::MockRemoteNS rns;
cta::MockSchedulerDatabase db;
cta::Scheduler scheduler(ns, db, rns);
DataTransferSession sess("tapeHost", logger, mockSys,
driveConfig, mc, initialProcess, capUtils, castorConf);
driveConfig, mc, initialProcess, capUtils, castorConf, scheduler);
sess.execute();
simRun.wait();
ASSERT_EQ(SEINTERNAL, sim.m_sessionErrorCode);
......@@ -712,8 +744,12 @@ TEST(tapeServer, DataTransferSessionTapeFullMigration) {
castor::mediachanger::MediaChangerFacade mc(acs, mmc, rmc);
castor::messages::TapeserverProxyDummy initialProcess;
castor::server::ProcessCapDummy capUtils;
cta::MockNameServer ns;
cta::MockRemoteNS rns;
cta::MockSchedulerDatabase db;
cta::Scheduler scheduler(ns, db, rns);
DataTransferSession sess("tapeHost", logger, mockSys,
driveConfig, mc, initialProcess, capUtils, castorConf);
driveConfig, mc, initialProcess, capUtils, castorConf, scheduler);
sess.execute();
simRun.wait();
for (std::vector<struct expectedResult>::iterator i = expected.begin();
......@@ -804,8 +840,12 @@ TEST(tapeServer, DataTransferSessionTapeFullOnFlushMigration) {
castor::mediachanger::MediaChangerFacade mc(acs, mmc, rmc);
castor::messages::TapeserverProxyDummy initialProcess;
castor::server::ProcessCapDummy capUtils;
cta::MockNameServer ns;
cta::MockRemoteNS rns;
cta::MockSchedulerDatabase db;
cta::Scheduler scheduler(ns, db, rns);
DataTransferSession sess("tapeHost", logger, mockSys,
driveConfig, mc, initialProcess, capUtils, castorConf);
driveConfig, mc, initialProcess, capUtils, castorConf, scheduler);
sess.execute();
simRun.wait();
for (std::vector<struct expectedResult>::iterator i = expected.begin();
......
......@@ -37,11 +37,11 @@ castor::tape::tapeserver::daemon::DriveConfig::DriveConfig() throw():
//------------------------------------------------------------------------------
castor::tape::tapeserver::daemon::DriveConfig::DriveConfig(
const std::string &unitName,
const std::string &dgn,
const std::string &logicalLibrary,
const std::string &devFilename,
const std::string &librarySlot):
m_unitName(unitName),
m_dgn(dgn),
m_logicalLibrary(logicalLibrary),
m_devFilename(devFilename),
m_librarySlot(mediachanger::LibrarySlotParser::parse(librarySlot)) {
}
......@@ -52,7 +52,7 @@ castor::tape::tapeserver::daemon::DriveConfig::DriveConfig(
castor::tape::tapeserver::daemon::DriveConfig::DriveConfig(
const DriveConfig &obj):
m_unitName(obj.m_unitName),
m_dgn(obj.m_dgn),
m_logicalLibrary(obj.m_logicalLibrary),
m_devFilename(obj.m_devFilename),
m_librarySlot(0 == obj.m_librarySlot ? 0 : obj.m_librarySlot->clone()) {
}
......@@ -75,7 +75,7 @@ castor::tape::tapeserver::daemon::DriveConfig &castor::tape::tapeserver::
delete(m_librarySlot);
m_unitName = rhs.m_unitName;
m_dgn = rhs.m_dgn;
m_logicalLibrary = rhs.m_logicalLibrary;
m_devFilename = rhs.m_devFilename;
m_librarySlot = 0 == rhs.m_librarySlot ? 0 : rhs.m_librarySlot->clone();
}
......@@ -92,11 +92,11 @@ const std::string &castor::tape::tapeserver::daemon::DriveConfig::getUnitName()
}
//------------------------------------------------------------------------------
// getDgn
// getLogicalLibrary
//------------------------------------------------------------------------------
const std::string &castor::tape::tapeserver::daemon::DriveConfig::getDgn()
const std::string &castor::tape::tapeserver::daemon::DriveConfig::getLogicalLibrary()
const throw() {
return m_dgn;
return m_logicalLibrary;
}
//------------------------------------------------------------------------------
......
......@@ -49,7 +49,7 @@ public:
* Constructor.
*
* @param unitName The unit name of the tape drive.
* @param dgn The device group name of the tape drive as used by the vdqmd
* @param logicalLibrary The logical Library of the tape drive as used by the vdqmd
* and vmgrd daemons.
* @param devFilename The device file of the tape drive, for example:
* /dev/nst0.
......@@ -58,7 +58,7 @@ public:
*/
DriveConfig(
const std::string &unitName,
const std::string &dgn,
const std::string &logicalLibrary,
const std::string &devFilename,
const std::string &librarySlot);
......@@ -89,13 +89,13 @@ public:
const std::string &getUnitName() const throw();
/**
* Gets the device group name of the tape drive as used by the vdqmd and
* Gets the logical Library name of the tape drive as used by the vdqmd and
* vmgrd daemons.
*
* @return The device group name of the tape drive as used by the vdqmd and
* @return The logical Library name of the tape drive as used by the vdqmd and
* vmgrd daemons.
*/
const std::string &getDgn() const throw();
const std::string &getLogicalLibrary() const throw();
/**
* Gets the device file of the tape drive, for example: /dev/nst0
......@@ -121,10 +121,10 @@ private:
std::string m_unitName;
/**
* The device group name of the tape drive as used by the vdqmd and vmgrd
* The logical Library of the tape drive as used by the vdqmd and vmgrd
* daemons.
*/
std::string m_dgn;
std::string m_logicalLibrary;
/**
* The device file of the tape drive, for example: /dev/nst0
......
......@@ -56,7 +56,7 @@ void castor::tape::tapeserver::daemon::DriveConfigMap::enterTpconfigLine(
// Insert the drive
(*this)[line.unitName] = DriveConfig(
line.unitName,
line.dgn,
line.logicalLibrary,
line.devFilename,
line.librarySlot);
} catch(castor::exception::Exception &ne) {
......
......@@ -47,7 +47,7 @@ TEST_F(castor_tape_tapeserver_daemon_DriveConfigTest, manual_drive_slot) {
"manual");
ASSERT_EQ("unit", config.getUnitName());
ASSERT_EQ("dgn", config.getDgn());
ASSERT_EQ("dgn", config.getLogicalLibrary());
ASSERT_EQ("devFilename", config.getDevFilename());
ASSERT_NO_THROW(config.getLibrarySlot());
{
......@@ -68,7 +68,7 @@ TEST_F(castor_tape_tapeserver_daemon_DriveConfigTest, copy_constructor) {
"devFilename1",
"manual1");
ASSERT_EQ("unit1", config1.getUnitName());
ASSERT_EQ("dgn1", config1.getDgn());
ASSERT_EQ("dgn1", config1.getLogicalLibrary());
ASSERT_EQ("devFilename1", config1.getDevFilename());
ASSERT_NO_THROW(config1.getLibrarySlot());
{
......@@ -81,7 +81,7 @@ TEST_F(castor_tape_tapeserver_daemon_DriveConfigTest, copy_constructor) {
DriveConfig config2(config1);
ASSERT_EQ("unit1", config2.getUnitName());
ASSERT_EQ("dgn1", config2.getDgn());
ASSERT_EQ("dgn1", config2.getLogicalLibrary());
ASSERT_EQ("devFilename1", config2.getDevFilename());
ASSERT_NO_THROW(config2.getLibrarySlot());
{
......@@ -102,7 +102,7 @@ TEST_F(castor_tape_tapeserver_daemon_DriveConfigTest, assignment) {
"devFilename1",
"manual1");
ASSERT_EQ("unit1", config1.getUnitName());
ASSERT_EQ("dgn1", config1.getDgn());
ASSERT_EQ("dgn1", config1.getLogicalLibrary());
ASSERT_EQ("devFilename1", config1.getDevFilename());
ASSERT_NO_THROW(config1.getLibrarySlot());
{
......@@ -119,7 +119,7 @@ TEST_F(castor_tape_tapeserver_daemon_DriveConfigTest, assignment) {
"devFilename2",
"manual2");
ASSERT_EQ("unit2", config2.getUnitName());
ASSERT_EQ("dgn2", config2.getDgn());
ASSERT_EQ("dgn2", config2.getLogicalLibrary());
ASSERT_EQ("devFilename2", config2.getDevFilename());
ASSERT_NO_THROW(config2.getLibrarySlot());
{
......@@ -133,7 +133,7 @@ TEST_F(castor_tape_tapeserver_daemon_DriveConfigTest, assignment) {
config1 = config2;
ASSERT_EQ("unit2", config1.getUnitName());
ASSERT_EQ("dgn2", config1.getDgn());
ASSERT_EQ("dgn2", config1.getLogicalLibrary());
ASSERT_EQ("devFilename2", config1.getDevFilename());
ASSERT_NO_THROW(config1.getLibrarySlot());
{
......@@ -145,7 +145,7 @@ TEST_F(castor_tape_tapeserver_daemon_DriveConfigTest, assignment) {
}
ASSERT_EQ("unit2", config2.getUnitName());
ASSERT_EQ("dgn2", config2.getDgn());
ASSERT_EQ("dgn2", config2.getLogicalLibrary());
ASSERT_EQ("devFilename2", config2.getDevFilename());
ASSERT_NO_THROW(config2.getLibrarySlot());
{
......
......@@ -245,7 +245,7 @@ void castor::tape::tapeserver::daemon::LabelCmdConnectionHandler::
log::Param params[] = {
log::Param("drive", job.drive),
log::Param("TPVID", job.vid),
log::Param("dgn", job.dgn),
log::Param("logicalLibrary", job.logicalLibrary),
log::Param("uid", job.uid),
log::Param("gid", job.gid)};
m_log(LOG_INFO, "Received request to label a tape", params);
......
......@@ -85,7 +85,7 @@ castor::tape::tapeserver::daemon::Session::EndOfSessionAction
params.push_back(log::Param("gid", m_request.gid));
params.push_back(log::Param("TPVID", m_request.vid));
params.push_back(log::Param("unitName", m_request.drive));
params.push_back(log::Param("dgn", m_request.dgn));
params.push_back(log::Param("logicalLibrary", m_request.logicalLibrary));
params.push_back(log::Param("force", boolToStr(m_force)));
params.push_back(log::Param("message", errorMessage));
m_log(LOG_ERR, "Label session failed", params);
......@@ -145,7 +145,7 @@ void castor::tape::tapeserver::daemon::LabelSession::setProcessCapabilities(
params.push_back(log::Param("gid", m_request.gid));
params.push_back(log::Param("TPVID", m_request.vid));
params.push_back(log::Param("unitName", m_request.drive));
params.push_back(log::Param("dgn", m_request.dgn));
params.push_back(log::Param("logicalLibrary", m_request.logicalLibrary));
params.push_back(log::Param("force", boolToStr(m_force)));
m_capUtils.setProcText(capabilities);
......@@ -185,7 +185,7 @@ void castor::tape::tapeserver::daemon::LabelSession::mountTape() {
params.push_back(log::Param("gid", m_request.gid));
params.push_back(log::Param("TPVID", m_request.vid));