Commit 633dff91 authored by Eric Cano's avatar Eric Cano
Browse files

Added support for setting the mount criteria in the tape pools.

Removed usage of the mock scheduler database that will not be updated for further modification in the scheduler database interface.
parent 6c0ce3c6
/*
* The CERN Tape Archive (CTA) project
* Copyright (C) 2015 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#pragma once
namespace cta {
/**
* Description of the criteria to mount a tape
*/
struct MountCriteria {
uint64_t maxFilesQueued; /**< The maximum number of files to be queued
* before trigerring a mount */
uint64_t maxBytesQueued; /**< The maximum amount a data before trigerring
* a request */
uint64_t maxAge; /**< The maximum age for a request before trigerring
* a request (in seconds) */
uint16_t quota; /**< The maximum number of mounts for this tape pool */
MountCriteria(uint64_t maxFiles, uint64_t maxBytes, uint64_t maxAge,
uint16_t quota):
maxFilesQueued(maxFiles), maxBytesQueued(maxBytesQueued), maxAge(maxAge),
quota(quota) {}
MountCriteria(): maxFilesQueued(0), maxBytesQueued(0), maxAge(0), quota(0) {}
};
struct MountCriteriaByDirection {
MountCriteria archive;
MountCriteria retrieve;
MountCriteriaByDirection(const MountCriteria& archive, const MountCriteria & retrieve):
archive(archive), retrieve(retrieve) {}
MountCriteriaByDirection(): archive(), retrieve() {}
};
}
\ No newline at end of file
......@@ -35,13 +35,14 @@ cta::TapePool::~TapePool() throw() {
// constructor
//------------------------------------------------------------------------------
cta::TapePool::TapePool(
const std::string &name,
const uint32_t nbPartialTapes,
const CreationLog &creationLog):
const std::string &name,
const uint32_t nbPartialTapes,
const MountCriteriaByDirection & mountCriteriaByDirection,
const CreationLog &creationLog):
name(name),
nbPartialTapes(nbPartialTapes),
creationLog(creationLog) {
}
mountCriteriaByDirection(mountCriteriaByDirection),
creationLog(creationLog) {}
//------------------------------------------------------------------------------
// operator<
......
......@@ -19,6 +19,7 @@
#pragma once
#include "common/CreationLog.hpp"
#include "common/MountControl.hpp"
#include <string>
......@@ -51,6 +52,7 @@ struct TapePool {
TapePool(
const std::string &name,
const uint32_t nbPartialTapes,
const MountCriteriaByDirection & mountCriteriaByDirection,
const CreationLog &creationLog);
/**
......@@ -71,6 +73,11 @@ struct TapePool {
*/
uint32_t nbPartialTapes;
/**
* The collection of criteria for deciding (or not) to mount a tape.
*/
MountCriteriaByDirection mountCriteriaByDirection;
/**
* The record of the entry's creation
*/
......
......@@ -24,6 +24,7 @@
#include "ObjectOps.hpp"
#include "CreationLog.hpp"
#include "UserIdentity.hpp"
#include "common/MountControl.hpp"
#include <list>
namespace cta { namespace objectstore {
......@@ -147,6 +148,7 @@ public:
std::string tapePool;
std::string address;
uint32_t nbPartialTapes;
MountCriteriaByDirection mountCriteriaByDirection;
CreationLog log;
};
std::list<TapePoolDump> dumpTapePools();
......
......@@ -56,10 +56,8 @@ void cta::objectstore::TapePool::initialize(const std::string& name) {
m_payload.mutable_retievemountcriteria()->set_maxfilesbeforemount(100000);
m_payload.mutable_retievemountcriteria()->set_maxsecondsbeforemount(7*24*60*60);
// Default quotas are zero.
m_payload.mutable_archivemountquota()->set_quota(0);
m_payload.mutable_archivemountquota()->set_allowedoverhead(0);
m_payload.mutable_retrievemountquota()->set_quota(0);
m_payload.mutable_retrievemountquota()->set_allowedoverhead(0);
m_payload.mutable_archivemountcriteria()->set_quota(0);
m_payload.mutable_retievemountcriteria()->set_quota(0);
// default the retries to 0.
m_payload.set_maxretriespermount(0);
m_payload.set_maxtotalretries(0);
......@@ -356,28 +354,25 @@ bool cta::objectstore::TapePool::addOrphanedJobPendingNsDeletion(
return true;
}
cta::objectstore::TapePool::MountCriteria
cta::objectstore::TapePool::getMountCriteria() {
MountCriteria ret;
cta::MountCriteriaByDirection
cta::objectstore::TapePool::getMountCriteriaByDirection() {
MountCriteriaByDirection ret;
checkPayloadReadable();
ret.archive.maxAge = m_payload.archivemountcriteria().maxsecondsbeforemount();
ret.archive.maxBytesQueued = m_payload.archivemountcriteria().maxbytesbeforemount();
ret.archive.maxFilesQueued = m_payload.archivemountcriteria().maxfilesbeforemount();
ret.archive.quota = m_payload.archivemountcriteria().quota();
ret.retrieve.maxAge = m_payload.retievemountcriteria().maxsecondsbeforemount();
ret.retrieve.maxBytesQueued = m_payload.retievemountcriteria().maxbytesbeforemount();
ret.retrieve.maxFilesQueued = m_payload.retievemountcriteria().maxfilesbeforemount();
ret.retrieve.quota = m_payload.retievemountcriteria().quota();
return ret;
}
cta::objectstore::TapePool::MountQuota
cta::objectstore::TapePool::getMountQuota() {
checkPayloadReadable();
MountQuota ret;
ret.archive.quota = m_payload.archivemountquota().quota();
ret.archive.allowedOverhead = m_payload.archivemountquota().allowedoverhead();
ret.retrieve.quota = m_payload.retrievemountquota().quota();
ret.retrieve.allowedOverhead = m_payload.retrievemountquota().allowedoverhead();
return ret;
void cta::objectstore::TapePool::setMountCriteriaByDirection(
const MountCriteriaByDirection& mountCriteria) {
checkPayloadWritable();
}
......
......@@ -23,6 +23,7 @@
#include <string>
#include "objectstore/cta.pb.h"
#include "common/CreationLog.hpp"
#include "common/MountControl.hpp"
#include "ArchiveToFileRequest.hpp"
#include "CreationLog.hpp"
#include "Agent.hpp"
......@@ -104,29 +105,9 @@ public:
std::list<JobDump> dumpJobs();
// Mount management ==========================================================
struct MountCriteriaPerDirection {
uint64_t maxFilesQueued; /**< The maximum number of files to be queued
* before trigerring a mount */
uint64_t maxBytesQueued; /**< The maximum amount a data before trigerring
* a request */
uint64_t maxAge; /**< The maximum age for a request before trigerring
* a request (in seconds) */
};
struct MountCriteria {
MountCriteriaPerDirection archive;
MountCriteriaPerDirection retrieve;
};
MountCriteria getMountCriteria();
struct MountQuotaPerDirection {
uint16_t quota;
uint16_t allowedOverhead;
};
struct MountQuota {
MountQuotaPerDirection archive;
MountQuotaPerDirection retrieve;
};
MountQuota getMountQuota();
MountCriteriaByDirection getMountCriteriaByDirection();
void setMountCriteriaByDirection(const MountCriteriaByDirection & mountCriteria);
// Retry limits ==============================================================
uint16_t getMaxRetriesWithinMount();
......
......@@ -197,11 +197,7 @@ message MountCriteria {
required uint64 maxFilesBeforeMount = 3200;
required uint64 maxBytesBeforeMount = 3201;
required uint64 maxSecondsBeforeMount = 3202;
}
message MountQuota {
required uint32 quota = 3300;
required uint32 allowedoverhead = 3301;
required uint32 quota = 3203;
}
// ------------- Tape pools ---------------------------------------------------
......@@ -224,11 +220,9 @@ message TapePool {
required uint64 oldestJobCreationTime = 4106;
required MountCriteria archivemountcriteria = 4107;
required MountCriteria retievemountcriteria = 4108;
required MountQuota archivemountquota = 4109;
required MountQuota retrievemountquota = 4110;
required uint64 priority = 4111;
required uint32 maxretriespermount = 4112;
required uint32 maxtotalretries = 4113;
required uint64 priority = 4109;
required uint32 maxretriespermount = 4110;
required uint32 maxtotalretries = 4111;
}
// ------------- Tape ----------------------------------------------------------
......
......@@ -13,10 +13,10 @@ set (CTA_SCHEDULER_SRC_FILES
ArchiveToTapeCopyRequest.cpp
TapeMount.cpp
LogicalLibrary.cpp
mockDB/MockSchedulerDatabase.cpp
mockDB/MockSchedulerDatabaseFactory.cpp
mockDB/SqliteColumnNameToIndex.cpp
mockDB/SQLiteStatementDeleter.cpp
# mockDB/MockSchedulerDatabase.cpp
# mockDB/MockSchedulerDatabaseFactory.cpp
# mockDB/SqliteColumnNameToIndex.cpp
# mockDB/SQLiteStatementDeleter.cpp
MountType.cpp
PositioningMethod.cpp
RetrieveJob.cpp
......@@ -28,8 +28,8 @@ set (CTA_SCHEDULER_SRC_FILES
Scheduler.cpp
SchedulerDatabase.cpp
SchedulerDatabaseFactory.cpp
mockDB/SqliteColumnNameToIndex.cpp
mockDB/SQLiteStatementDeleter.cpp
# mockDB/SqliteColumnNameToIndex.cpp
# mockDB/SQLiteStatementDeleter.cpp
MountType.cpp
UserRequest.cpp)
......@@ -49,8 +49,8 @@ add_library (ctaschedulerutils SHARED
DummyScheduler.cpp)
add_library (ctaschedulerunittests SHARED
mockDB/MockSchedulerDatabase.cpp
mockDB/MockSchedulerDatabaseFactory.cpp
# mockDB/MockSchedulerDatabase.cpp
# mockDB/MockSchedulerDatabaseFactory.cpp
SchedulerDatabaseFactory.cpp
SchedulerDatabaseTest.cpp
SchedulerTest.cpp)
......
......@@ -103,17 +103,13 @@ std::unique_ptr<SchedulerDatabase::TapeMountDecisionInfo>
m.priority = tpool.getJobsSummary().priority;
m.mountCriteria.maxFilesQueued =
tpool.getMountCriteria().archive.maxFilesQueued;
tpool.getMountCriteriaByDirection().archive.maxFilesQueued;
m.mountCriteria.maxBytesQueued =
tpool.getMountCriteria().archive.maxBytesQueued;
tpool.getMountCriteriaByDirection().archive.maxBytesQueued;
m.mountCriteria.maxAge =
tpool.getMountCriteria().archive.maxAge;
m.mountQuota.quota =
tpool.getMountQuota().archive.quota;
m.mountQuota.allowedOverhead =
tpool.getMountQuota().archive.allowedOverhead;
tpool.getMountCriteriaByDirection().archive.maxAge;
m.mountCriteria.quota =
tpool.getMountCriteriaByDirection().archive.quota;
m.logicalLibrary = "";
}
......@@ -135,17 +131,13 @@ std::unique_ptr<SchedulerDatabase::TapeMountDecisionInfo>
m.logicalLibrary = t.getLogicalLibrary();
m.mountCriteria.maxFilesQueued =
tpool.getMountCriteria().retrieve.maxFilesQueued;
tpool.getMountCriteriaByDirection().retrieve.maxFilesQueued;
m.mountCriteria.maxBytesQueued =
tpool.getMountCriteria().retrieve.maxBytesQueued;
tpool.getMountCriteriaByDirection().retrieve.maxBytesQueued;
m.mountCriteria.maxAge =
tpool.getMountCriteria().retrieve.maxAge;
m.mountQuota.quota =
tpool.getMountQuota().retrieve.quota;
m.mountQuota.allowedOverhead =
tpool.getMountQuota().retrieve.allowedOverhead;
tpool.getMountCriteriaByDirection().retrieve.maxAge;
m.mountCriteria.quota =
tpool.getMountCriteriaByDirection().retrieve.quota;
m.logicalLibrary = t.getLogicalLibrary();
}
}
......@@ -481,8 +473,22 @@ void OStoreDB::createTapePool(const std::string& name,
assertAgentSet();
re.addOrGetTapePoolAndCommit(name, nbPartialTapes, 5, 5, *m_agent, creationLog);
re.commit();
}
void OStoreDB::setTapePoolMountCriteria(const std::string& tapePool,
const MountCriteriaByDirection& mountCriteriaByDirection) {
RootEntry re(m_objectStore);
ScopedSharedLock rel(re);
re.fetch();
objectstore::TapePool tp(re.getTapePoolAddress(tapePool),m_objectStore);
rel.release();
ScopedExclusiveLock tplock(tp);
tp.fetch();
tp.setMountCriteriaByDirection(mountCriteriaByDirection);
tp.commit();
}
std::list<cta::TapePool> OStoreDB::getTapePools() const {
RootEntry re(m_objectStore);
ScopedSharedLock rel(re);
......@@ -491,7 +497,8 @@ std::list<cta::TapePool> OStoreDB::getTapePools() const {
rel.release();
std::list<cta::TapePool> ret;
for (auto tp=tpd.begin(); tp!=tpd.end(); tp++) {
ret.push_back(cta::TapePool(tp->tapePool, tp->nbPartialTapes, tp->log));
ret.push_back(cta::TapePool(tp->tapePool, tp->nbPartialTapes,
tp->mountCriteriaByDirection, tp->log));
}
return ret;
}
......@@ -860,10 +867,11 @@ std::map<cta::TapePool, std::list<ArchiveToTapeCopyRequest> >
auto tpl = re.dumpTapePools();
rel.release();
for (auto tpp=tpl.begin(); tpp!=tpl.end(); tpp++) {
cta::TapePool tp(tpp->tapePool, tpp->nbPartialTapes, tpp->log);
objectstore::TapePool ostp(tpp->address, m_objectStore);
ScopedSharedLock ostpl(ostp);
ostp.fetch();
cta::TapePool tp(tpp->tapePool, tpp->nbPartialTapes,
ostp.getMountCriteriaByDirection(), tpp->log);
auto arl = ostp.dumpJobs();
ostpl.release();
for (auto ar=arl.begin(); ar!=arl.end(); ar++) {
......@@ -905,10 +913,11 @@ std::list<ArchiveToTapeCopyRequest>
for (auto tpp=tpl.begin(); tpp!=tpl.end(); tpp++) {
if (tpp->tapePool != tapePoolName) continue;
std::list<ArchiveToTapeCopyRequest> ret;
cta::TapePool tp(tpp->tapePool, tpp->nbPartialTapes, tpp->log);
objectstore::TapePool ostp(tpp->address, m_objectStore);
ScopedSharedLock ostpl(ostp);
ostp.fetch();
cta::TapePool tp(tpp->tapePool, tpp->nbPartialTapes,
ostp.getMountCriteriaByDirection(), tpp->log);
auto arl = ostp.dumpJobs();
ostpl.release();
for (auto ar=arl.begin(); ar!=arl.end(); ar++) {
......
......@@ -155,6 +155,11 @@ public:
/* === Tape pools handling =============================================== */
virtual void createTapePool(const std::string& name,
const uint32_t nbPartialTapes, const cta::CreationLog &creationLog);
virtual void setTapePoolMountCriteria(const std::string& tapePool,
const MountCriteriaByDirection& mountCriteriaByDirection);
virtual std::list<TapePool> getTapePools() const;
......
......@@ -106,6 +106,10 @@ public:
virtual void createTapePool(const std::string& name, const uint32_t nbPartialTapes, const CreationLog& creationLog) {
m_OStoreDB.createTapePool(name, nbPartialTapes, creationLog);
}
virtual void setTapePoolMountCriteria(const std::string& tapePool, const MountCriteriaByDirection& mountCriteriaByDirection) {
m_OStoreDB.setTapePoolMountCriteria(tapePool, mountCriteriaByDirection);
}
virtual void deleteAdminHost(const SecurityIdentity& requester, const std::string& hostName) {
m_OStoreDB.deleteAdminHost(requester, hostName);
......
......@@ -319,6 +319,14 @@ std::list<cta::TapePool> cta::Scheduler::getTapePools(
return m_db.getTapePools();
}
//------------------------------------------------------------------------------
// getTapePools
//------------------------------------------------------------------------------
void cta::Scheduler::setTapePoolMountCriteria(
const std::string & tapePool, const MountCriteriaByDirection & mountCriteriaByDirection) {
return m_db.setTapePoolMountCriteria(tapePool, mountCriteriaByDirection);
}
//------------------------------------------------------------------------------
// createArchiveRoute
//------------------------------------------------------------------------------
......@@ -809,11 +817,11 @@ std::unique_ptr<cta::TapeMount> cta::Scheduler::getNextMount(
mountPassesACriteria = true;
if (!existingMounts && ((time(NULL) - m->oldestJobStartTime) > (int64_t)m->mountCriteria.maxAge))
mountPassesACriteria = true;
if (!mountPassesACriteria || existingMounts > m->mountQuota.quota) {
if (!mountPassesACriteria || existingMounts > m->mountCriteria.quota) {
m = mountInfo->potentialMounts.erase(m);
} else {
// populate the mount with a weight
m->ratioOfMountQuotaUsed = 1.0L * existingMounts / m->mountQuota.quota;
m->ratioOfMountQuotaUsed = 1.0L * existingMounts / m->mountCriteria.quota;
}
}
......
......@@ -332,7 +332,7 @@ public:
const std::string &name,
const uint32_t nbPartialTapes,
const std::string &comment);
/**
* Delete the tape pool with the specifed name.
*
......@@ -352,6 +352,10 @@ public:
*/
virtual std::list<TapePool> getTapePools(
const SecurityIdentity &requester) const;
/***/
virtual void setTapePoolMountCriteria(const std::string & tapePoolName,
const MountCriteriaByDirection & mountCriteriaByDirection);
/**
* Creates the specified archive route.
......
......@@ -26,8 +26,12 @@
#include <vector>
#include <stdexcept>
#include "common/archiveNS/ArchiveFile.hpp"
#include "common/admin/AdminUser.hpp"
#include "common/admin/AdminHost.hpp"
#include "common/archiveRoutes/ArchiveRoute.hpp"
#include "common/remoteFS/RemotePathAndStatus.hpp"
#include "scheduler/MountType.hpp"
#include "common/MountControl.hpp"
namespace cta {
......@@ -237,25 +241,10 @@ public:
};
/*============ Session management ==========================================*/
/**
* A structure describing a potential mount with all the information allowing
* comparison between mounts.
*/
struct MountCriteria {
uint64_t maxFilesQueued; /**< The maximum number of files to be queued
* before trigerring a mount */
uint64_t maxBytesQueued; /**< The maximum amount a data before trigerring
* a request */
uint64_t maxAge; /**< The maximum age for a request before trigerring
* a request (in seconds) */
};
struct MountQuota {
uint16_t quota;
uint16_t allowedOverhead;
};
struct PotentialMount {
cta::MountType::Enum type; /**< Is this an archive or retireve? */
std::string vid; /**< The tape VID (for a retieve) */
......@@ -264,8 +253,7 @@ public:
uint64_t filesQueued; /**< The number of files queued for this queue */
uint64_t bytesQueued; /**< The amount of data currently queued */
time_t oldestJobStartTime; /**< Creation time of oldest request */
MountCriteria mountCriteria; /**< The mount criteria collection */
MountQuota mountQuota; /**< The mount quota collection */
MountCriteria mountCriteria; /**< The mount criteria collection */
std::string logicalLibrary; /**< The logical library (for a retrieve) */
double ratioOfMountQuotaUsed; /**< The [ 0.0, 1.0 [ ratio of existing mounts/quota (for faire share of mounts)*/
......@@ -456,7 +444,16 @@ public:
const std::string &name,
const uint32_t nbPartialTapes,
const CreationLog& creationLog) = 0;
/**
* Sets the mount criteria for a tape pool.
* @param tapePool tape pool name
* @param mountCriteriaByDirection the set of all the mount criteria.
*/
virtual void setTapePoolMountCriteria(const std::string & tapePool,
const MountCriteriaByDirection & mountCriteriaByDirection) = 0;
/**
* Delete the tape pool with the specified name.
*
......
......@@ -22,8 +22,8 @@
#include "common/archiveRoutes/ArchiveRoute.hpp"
#include "scheduler/ArchiveToFileRequest.hpp"
#include "scheduler/RetrieveToFileRequest.hpp"
#include "scheduler/mockDB/MockSchedulerDatabase.hpp"
#include "scheduler/mockDB/MockSchedulerDatabaseFactory.hpp"
//#include "scheduler/mockDB/MockSchedulerDatabase.hpp"
//#include "scheduler/mockDB/MockSchedulerDatabaseFactory.hpp"
#include "scheduler/SchedulerDatabase.hpp"
#include "scheduler/SchedulerDatabaseFactory.hpp"
#include "common/SecurityIdentity.hpp"
......
......@@ -25,7 +25,7 @@
#include "scheduler/ArchiveToFileRequest.hpp"
#include "scheduler/ArchiveToTapeCopyRequest.hpp"
#include "scheduler/LogicalLibrary.hpp"
#include "scheduler/mockDB/MockSchedulerDatabaseFactory.hpp"
//#include "scheduler/mockDB/MockSchedulerDatabaseFactory.hpp"
#include "scheduler/MountRequest.hpp"
#include "scheduler/Scheduler.hpp"
#include "scheduler/SchedulerDatabase.hpp"
......@@ -2287,6 +2287,8 @@ TEST_P(SchedulerTest, archive_and_retrieve_new_file) {
const std::string tapePoolComment = "Tape-pool comment";
ASSERT_NO_THROW(scheduler.createTapePool(s_adminOnAdminHost, tapePoolName,
nbPartialTapes, tapePoolComment));
MountCriteriaByDirection mcbd(MountCriteria(0,0,0,1), MountCriteria(0,0,0,1));
ASSERT_NO_THROW(scheduler.setTapePoolMountCriteria("TapeTapePool", mcbd));
const std::string libraryName = "TestLogicalLibrary";
const std::string libraryComment = "Library comment";
......@@ -2562,13 +2564,14 @@ TEST_P(SchedulerTest, setOwner_statFile_top_level) {
ASSERT_EQ(s_user.gid, status->owner.gid);
}
}
static cta::MockNameServerFactory mockNsFactory;
static cta::MockSchedulerDatabaseFactory mockDbFactory;
#undef TEST_MOCK_DB
#ifdef TEST_MOCK_DB
static cta::MockSchedulerDatabaseFactory mockDbFactory;
INSTANTIATE_TEST_CASE_P(MockSchedulerTest, SchedulerTest,
::testing::Values(SchedulerTestParam(mockNsFactory, mockDbFactory)));
#endif
static cta::OStoreDBFactory<cta::objectstore::BackendVFS> OStoreDBFactory;
......
......@@ -427,6 +427,7 @@ cta::TapePool cta::MockSchedulerDatabase::getTapePool(const std::string &name)
pool = TapePool(
(char *)sqlite3_column_text(statement.get(),idx("NAME")),
sqlite3_column_int(statement.get(),idx("NBPARTIALTAPES")),
MountCriteriaByDirection(MountCriteria(0,0,0,0),MountCriteria(0,0,0,0)),
CreationLog(
UserIdentity(sqlite3_column_int(statement.get(),idx("UID")),
sqlite3_column_int(statement.get(),idx("GID"))),
......@@ -1183,6 +1184,7 @@ std::list<cta::TapePool> cta::MockSchedulerDatabase::getTapePools() const {
pools.push_back(TapePool(
(char *)sqlite3_column_text(statement.get(),idx("NAME")),
sqlite3_column_int(statement.get(),idx("NBPARTIALTAPES")),
MountCriteriaByDirection(),
CreationLog(
UserIdentity(sqlite3_column_int(statement.get(),idx("UID")),
sqlite3_column_int(statement.get(),idx("GID"))),
......
......@@ -326,6 +326,10 @@ public:
const SecurityIdentity &requester,
const std::string &name);
virtual void setTapePoolMountCriteria(const std::string& tapePool, const MountCriteriaByDirection& mountCriteriaByDirection);
/**
* Gets the current list of tape pools in lexicographical order.
*
......
......@@ -87,7 +87,10 @@ castor::tape::tapeserver::daemon::Session::EndOfSessionAction
// Create a sticky thread name, which will be overridden by the other threads
lc.pushOrReplace(log::Param("thread", "MainThread"));
// 2a) Get initial information from the client
std::unique_ptr<cta::TapeMount> tapeMount(m_scheduler.getNextMount(m_driveConfig.getLogicalLibrary(), m_driveConfig.getUnitName())); //getNextMount throws not implemented exception
std::unique_ptr<cta::TapeMount> tapeMount(m_scheduler.getNextMount(m_driveConfig.getLogicalLibrary(), m_driveConfig.getUnitName())); //getNextMount throws not implemented exception, but can return NULL
// No mount to be done found, that was fast...
if (!tapeMount.get())
return MARK_DRIVE_AS_UP;
m_volInfo.vid=tapeMount->getVid();
m_volInfo.mountType=tapeMount->getMountType();
m_volInfo.density=tapeMount->getDensity();
......
......@@ -48,7 +48,7 @@
#include "nameserver/mockNS/MockNameServer.hpp"
#include "remotens/MockRemoteNS.hpp"
#include "scheduler/DummyScheduler.hpp"
#include "scheduler/mockDB/MockSchedulerDatabase.hpp"
#include "scheduler/OStoreDB/OStoreDBFactory.hpp"
#include "scheduler/MountType.hpp"