Commit 536c2f16 authored by Cedric CAFFY's avatar Cedric CAFFY
Browse files

Unified keys in log files : vid -> tapeVid, unitName -> tapeDrive, TPVID -> tapeVid

parent 2a1bbf46
...@@ -111,7 +111,7 @@ std::unique_ptr<common::dataStructures::ArchiveFile> ArchiveFileBuilder::append( ...@@ -111,7 +111,7 @@ std::unique_ptr<common::dataStructures::ArchiveFile> ArchiveFileBuilder::append(
params.push_back(cta::log::Param("archiveFileID", tapeFile.archiveFileID)); params.push_back(cta::log::Param("archiveFileID", tapeFile.archiveFileID));
params.push_back(cta::log::Param("duplicateCopyNb", copyNbOfTapeFileToAppend)); params.push_back(cta::log::Param("duplicateCopyNb", copyNbOfTapeFileToAppend));
params.push_back(cta::log::Param("workaroundCopyNb", workaroundCopyNb)); params.push_back(cta::log::Param("workaroundCopyNb", workaroundCopyNb));
params.push_back(cta::log::Param("vid", vid)); params.push_back(cta::log::Param("tapeVid", vid));
params.push_back(cta::log::Param("fSeq", fSeq)); params.push_back(cta::log::Param("fSeq", fSeq));
params.push_back(cta::log::Param("blockId", blockId)); params.push_back(cta::log::Param("blockId", blockId));
m_log(cta::log::WARNING, "Found a duplicate tape copy number when listing archive files", params); m_log(cta::log::WARNING, "Found a duplicate tape copy number when listing archive files", params);
......
...@@ -34,7 +34,7 @@ MmcProxy::MmcProxy(log::Logger &log): ...@@ -34,7 +34,7 @@ MmcProxy::MmcProxy(log::Logger &log):
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void MmcProxy::mountTapeReadOnly( const std::string &vid, const LibrarySlot &librarySlot) { void MmcProxy::mountTapeReadOnly( const std::string &vid, const LibrarySlot &librarySlot) {
std::list<log::Param> params = { std::list<log::Param> params = {
log::Param("TPVID", vid), log::Param("tapeVid", vid),
log::Param("librarySlot", librarySlot.str())}; log::Param("librarySlot", librarySlot.str())};
m_log(log::WARNING, "Tape should be manual mounted for read-only access", params); m_log(log::WARNING, "Tape should be manual mounted for read-only access", params);
} }
...@@ -44,7 +44,7 @@ void MmcProxy::mountTapeReadOnly( const std::string &vid, const LibrarySlot &lib ...@@ -44,7 +44,7 @@ void MmcProxy::mountTapeReadOnly( const std::string &vid, const LibrarySlot &lib
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void MmcProxy::mountTapeReadWrite(const std::string &vid, const LibrarySlot &librarySlot) { void MmcProxy::mountTapeReadWrite(const std::string &vid, const LibrarySlot &librarySlot) {
std::list<log::Param> params = { std::list<log::Param> params = {
log::Param("TPVID", vid), log::Param("tapeVid", vid),
log::Param("librarySlot", librarySlot.str())}; log::Param("librarySlot", librarySlot.str())};
m_log(log::WARNING, "Tape should be manual mounted for read/write access", params); m_log(log::WARNING, "Tape should be manual mounted for read/write access", params);
} }
...@@ -54,7 +54,7 @@ void MmcProxy::mountTapeReadWrite(const std::string &vid, const LibrarySlot &lib ...@@ -54,7 +54,7 @@ void MmcProxy::mountTapeReadWrite(const std::string &vid, const LibrarySlot &lib
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void MmcProxy::dismountTape( const std::string &vid, const LibrarySlot &librarySlot) { void MmcProxy::dismountTape( const std::string &vid, const LibrarySlot &librarySlot) {
std::list<log::Param> params = { std::list<log::Param> params = {
log::Param("TPVID", vid), log::Param("tapeVid", vid),
log::Param("librarySlot", librarySlot.str())}; log::Param("librarySlot", librarySlot.str())};
m_log(log::WARNING, "Tape should be manual dismounted", params); m_log(log::WARNING, "Tape should be manual dismounted", params);
} }
...@@ -64,7 +64,7 @@ void MmcProxy::dismountTape( const std::string &vid, const LibrarySlot &libraryS ...@@ -64,7 +64,7 @@ void MmcProxy::dismountTape( const std::string &vid, const LibrarySlot &libraryS
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void MmcProxy::forceDismountTape(const std::string &vid, const LibrarySlot &librarySlot) { void MmcProxy::forceDismountTape(const std::string &vid, const LibrarySlot &librarySlot) {
std::list<log::Param> params = { std::list<log::Param> params = {
log::Param("TPVID", vid), log::Param("tapeVid", vid),
log::Param("librarySlot", librarySlot.str())}; log::Param("librarySlot", librarySlot.str())};
m_log(log::WARNING, "Tape should be manual dismounted", params); m_log(log::WARNING, "Tape should be manual dismounted", params);
} }
......
...@@ -232,7 +232,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler:: ...@@ -232,7 +232,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler::
const uint32_t panel = rqstBody.panel(); const uint32_t panel = rqstBody.panel();
const uint32_t drive = rqstBody.drive(); const uint32_t drive = rqstBody.drive();
std::list<log::Param> params = {log::Param("TPVID", vid), std::list<log::Param> params = {log::Param("tapeVid", vid),
log::Param("acs", acs), log::Param("acs", acs),
log::Param("lsm", lsm), log::Param("lsm", lsm),
log::Param("panel", panel), log::Param("panel", panel),
...@@ -277,7 +277,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler:: ...@@ -277,7 +277,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler::
const uint32_t panel = rqstBody.panel(); const uint32_t panel = rqstBody.panel();
const uint32_t drive = rqstBody.drive(); const uint32_t drive = rqstBody.drive();
std::list<log::Param> params = {log::Param("TPVID", vid), std::list<log::Param> params = {log::Param("tapeVid", vid),
log::Param("acs", acs), log::Param("acs", acs),
log::Param("lsm", lsm), log::Param("lsm", lsm),
log::Param("panel", panel), log::Param("panel", panel),
...@@ -322,7 +322,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler:: ...@@ -322,7 +322,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler::
const uint32_t panel = rqstBody.panel(); const uint32_t panel = rqstBody.panel();
const uint32_t drive = rqstBody.drive(); const uint32_t drive = rqstBody.drive();
std::list<log::Param> params = {log::Param("TPVID", vid), std::list<log::Param> params = {log::Param("tapeVid", vid),
log::Param("acs", acs), log::Param("acs", acs),
log::Param("lsm", lsm), log::Param("lsm", lsm),
log::Param("panel", panel), log::Param("panel", panel),
...@@ -371,7 +371,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler:: ...@@ -371,7 +371,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler::
const uint32_t panel = rqstBody.panel(); const uint32_t panel = rqstBody.panel();
const uint32_t drive = rqstBody.drive(); const uint32_t drive = rqstBody.drive();
std::list<log::Param> params = {log::Param("TPVID", vid), std::list<log::Param> params = {log::Param("tapeVid", vid),
log::Param("acs", acs), log::Param("acs", acs),
log::Param("lsm", lsm), log::Param("lsm", lsm),
log::Param("panel", panel), log::Param("panel", panel),
......
...@@ -121,7 +121,7 @@ void cta::mediachanger::acs::daemon::AcsPendingRequests::handleCompletedRequests ...@@ -121,7 +121,7 @@ void cta::mediachanger::acs::daemon::AcsPendingRequests::handleCompletedRequests
itor != m_acsRequestList.end();itor++) { itor != m_acsRequestList.end();itor++) {
cta::mediachanger::acs::daemon::AcsRequest *const acsRequest = *itor; cta::mediachanger::acs::daemon::AcsRequest *const acsRequest = *itor;
if (acsRequest->isCompleted()) { if (acsRequest->isCompleted()) {
std::list<log::Param> params = {log::Param("TPVID", acsRequest->getVid()), std::list<log::Param> params = {log::Param("tapeVid", acsRequest->getVid()),
log::Param("acs", acsRequest->getAcs()), log::Param("acs", acsRequest->getAcs()),
log::Param("lsm", acsRequest->getLsm()), log::Param("lsm", acsRequest->getLsm()),
log::Param("panel", acsRequest->getPanel()), log::Param("panel", acsRequest->getPanel()),
...@@ -143,7 +143,7 @@ void cta::mediachanger::acs::daemon::AcsPendingRequests::handleFailedRequests() ...@@ -143,7 +143,7 @@ void cta::mediachanger::acs::daemon::AcsPendingRequests::handleFailedRequests()
itor != m_acsRequestList.end();itor++) { itor != m_acsRequestList.end();itor++) {
cta::mediachanger::acs::daemon::AcsRequest *const acsRequest = *itor; cta::mediachanger::acs::daemon::AcsRequest *const acsRequest = *itor;
if (acsRequest->isFailed()) { if (acsRequest->isFailed()) {
std::list<log::Param> params = {log::Param("TPVID", acsRequest->getVid()), std::list<log::Param> params = {log::Param("tapeVid", acsRequest->getVid()),
log::Param("acs", acsRequest->getAcs()), log::Param("acs", acsRequest->getAcs()),
log::Param("lsm", acsRequest->getLsm()), log::Param("lsm", acsRequest->getLsm()),
log::Param("panel", acsRequest->getPanel()), log::Param("panel", acsRequest->getPanel()),
...@@ -231,7 +231,7 @@ void cta::mediachanger::acs::daemon::AcsPendingRequests::checkAndAddRequestDismo ...@@ -231,7 +231,7 @@ void cta::mediachanger::acs::daemon::AcsPendingRequests::checkAndAddRequestDismo
checkRequest(vid, acs, lsm, panel, drive); checkRequest(vid, acs, lsm, panel, drive);
std::list<log::Param> params = {log::Param("TPVID", vid), std::list<log::Param> params = {log::Param("tapeVid", vid),
log::Param("acs", acs), log::Param("acs", acs),
log::Param("lsm", lsm), log::Param("lsm", lsm),
log::Param("panel", panel), log::Param("panel", panel),
......
...@@ -348,7 +348,7 @@ void GarbageCollector::OwnedObjectSorter::sortFetchedObjects(Agent& agent, std:: ...@@ -348,7 +348,7 @@ void GarbageCollector::OwnedObjectSorter::sortFetchedObjects(Agent& agent, std::
for (auto & tc: rr->getArchiveFile().tapeFiles) { if (tc.second.vid==vid) { copyNb=tc.first; fSeq=tc.second.fSeq; } } for (auto & tc: rr->getArchiveFile().tapeFiles) { if (tc.second.vid==vid) { copyNb=tc.first; fSeq=tc.second.fSeq; } }
params3.add("fileId", rr->getArchiveFile().archiveFileID) params3.add("fileId", rr->getArchiveFile().archiveFileID)
.add("copyNb", copyNb) .add("copyNb", copyNb)
.add("vid", vid) .add("tapeVid", vid)
.add("fSeq", fSeq); .add("fSeq", fSeq);
lc.log(log::INFO, "Selected vid to be requeued for retrieve request."); lc.log(log::INFO, "Selected vid to be requeued for retrieve request.");
break; break;
...@@ -626,7 +626,7 @@ void GarbageCollector::OwnedObjectSorter::lockFetchAndUpdateRetrieveJobs(Agent& ...@@ -626,7 +626,7 @@ void GarbageCollector::OwnedObjectSorter::lockFetchAndUpdateRetrieveJobs(Agent&
params.add("retrieveRequestObject", rrup.retrieveRequest->getAddressIfSet()) params.add("retrieveRequestObject", rrup.retrieveRequest->getAddressIfSet())
.add("copyNb", rrup.copyNb) .add("copyNb", rrup.copyNb)
.add("fileId", rrup.retrieveRequest->getArchiveFile().archiveFileID) .add("fileId", rrup.retrieveRequest->getArchiveFile().archiveFileID)
.add("vid", tape.first) .add("tapeVid", tape.first)
.add("retreveQueueObject", rq.getAddressIfSet()) .add("retreveQueueObject", rq.getAddressIfSet())
.add("garbageCollectedPreviousOwner", agent.getAddressIfSet()); .add("garbageCollectedPreviousOwner", agent.getAddressIfSet());
lc.log(log::INFO, "In GarbageCollector::OwnedObjectSorter::lockFetchAndUpdateRetrieveJobs(): requeued retrieve job."); lc.log(log::INFO, "In GarbageCollector::OwnedObjectSorter::lockFetchAndUpdateRetrieveJobs(): requeued retrieve job.");
...@@ -675,7 +675,7 @@ void GarbageCollector::OwnedObjectSorter::lockFetchAndUpdateRetrieveJobs(Agent& ...@@ -675,7 +675,7 @@ void GarbageCollector::OwnedObjectSorter::lockFetchAndUpdateRetrieveJobs(Agent&
{ {
log::ScopedParamContainer params(lc); log::ScopedParamContainer params(lc);
auto jobsSummary = rq.getJobsSummary(); auto jobsSummary = rq.getJobsSummary();
params.add("vid", tape.first) params.add("tapeVid", tape.first)
.add("retrieveQueueObject", rq.getAddressIfSet()) .add("retrieveQueueObject", rq.getAddressIfSet())
.add("filesAdded", filesQueued - filesDequeued) .add("filesAdded", filesQueued - filesDequeued)
.add("bytesAdded", bytesQueued - bytesDequeued) .add("bytesAdded", bytesQueued - bytesDequeued)
......
...@@ -229,7 +229,7 @@ void Helpers::getLockedAndFetchedQueue<RetrieveQueue>(RetrieveQueue& retrieveQue ...@@ -229,7 +229,7 @@ void Helpers::getLockedAndFetchedQueue<RetrieveQueue>(RetrieveQueue& retrieveQue
rootQueueDereferenceTime += t.secs(utils::Timer::resetCounter); rootQueueDereferenceTime += t.secs(utils::Timer::resetCounter);
log::ScopedParamContainer params(lc); log::ScopedParamContainer params(lc);
params.add("vid", vid) params.add("tapeVid", vid)
.add("queueObject", retrieveQueue.getAddressIfSet()) .add("queueObject", retrieveQueue.getAddressIfSet())
.add("exceptionMsg", ex.getMessageValue()); .add("exceptionMsg", ex.getMessageValue());
lc.log(log::INFO, "In Helpers::getLockedAndFetchedQueue<RetrieveQueue>(): removed reference to gone retrieve queue from root entry."); lc.log(log::INFO, "In Helpers::getLockedAndFetchedQueue<RetrieveQueue>(): removed reference to gone retrieve queue from root entry.");
......
...@@ -158,7 +158,7 @@ jobFound:; ...@@ -158,7 +158,7 @@ jobFound:;
params.add("jobObject", getAddressIfSet()) params.add("jobObject", getAddressIfSet())
.add("queueObject", rq.getAddressIfSet()) .add("queueObject", rq.getAddressIfSet())
.add("copynb", bestTapeFile->copynb()) .add("copynb", bestTapeFile->copynb())
.add("vid", bestTapeFile->vid()) .add("tapeVid", bestTapeFile->vid())
.add("tapeSelectionTime", tapeSelectionTime) .add("tapeSelectionTime", tapeSelectionTime)
.add("queueUpdateTime", queueUpdateTime) .add("queueUpdateTime", queueUpdateTime)
.add("commitUnlockQueueTime", commitUnlockQueueTime); .add("commitUnlockQueueTime", commitUnlockQueueTime);
...@@ -181,7 +181,7 @@ jobFound:; ...@@ -181,7 +181,7 @@ jobFound:;
params.add("jobObject", getAddressIfSet()) params.add("jobObject", getAddressIfSet())
.add("queueObject", rq.getAddressIfSet()) .add("queueObject", rq.getAddressIfSet())
.add("copynb", bestTapeFile->copynb()) .add("copynb", bestTapeFile->copynb())
.add("vid", bestTapeFile->vid()) .add("tapeVid", bestTapeFile->vid())
.add("tapeSelectionTime", tapeSelectionTime) .add("tapeSelectionTime", tapeSelectionTime)
.add("queueUpdateTime", queueUpdateTime) .add("queueUpdateTime", queueUpdateTime)
.add("commitUnlockQueueTime", commitUnlockQueueTime) .add("commitUnlockQueueTime", commitUnlockQueueTime)
......
...@@ -380,7 +380,7 @@ void RootEntry::removeRetrieveQueueAndCommit(const std::string& vid, QueueType q ...@@ -380,7 +380,7 @@ void RootEntry::removeRetrieveQueueAndCommit(const std::string& vid, QueueType q
commit(); commit();
{ {
log::ScopedParamContainer params(lc); log::ScopedParamContainer params(lc);
params.add("vid", vid); params.add("tapeVid", vid);
lc.log(log::INFO, "In RootEntry::removeRetrieveQueueAndCommit(): removed retrieve queue reference."); lc.log(log::INFO, "In RootEntry::removeRetrieveQueueAndCommit(): removed retrieve queue reference.");
} }
} catch (serializers::NotFound &) { } catch (serializers::NotFound &) {
......
...@@ -340,7 +340,7 @@ std::shared_ptr<SharedQueueLock<Queue, Request>> MemQueue<Request, Queue>::share ...@@ -340,7 +340,7 @@ std::shared_ptr<SharedQueueLock<Queue, Request>> MemQueue<Request, Queue>::share
.add("tapepool", queueIndex); .add("tapepool", queueIndex);
} else if (typeid(Queue) == typeid(objectstore::RetrieveQueue)) { } else if (typeid(Queue) == typeid(objectstore::RetrieveQueue)) {
params.add("type", "Retrieve") params.add("type", "Retrieve")
.add("vid", queueIndex); .add("tapeVid", queueIndex);
} }
params.add("objectQueue", queue.getAddressIfSet()) params.add("objectQueue", queue.getAddressIfSet())
.add("jobsBefore", qJobsBefore) .add("jobsBefore", qJobsBefore)
......
...@@ -237,7 +237,7 @@ void OStoreDB::fetchMountInfo(SchedulerDatabase::TapeMountDecisionInfo& tmdi, Ro ...@@ -237,7 +237,7 @@ void OStoreDB::fetchMountInfo(SchedulerDatabase::TapeMountDecisionInfo& tmdi, Ro
log::LogContext lc(m_logger); log::LogContext lc(m_logger);
log::ScopedParamContainer params (lc); log::ScopedParamContainer params (lc);
params.add("queueObject", rqp.address) params.add("queueObject", rqp.address)
.add("vid", rqp.vid) .add("tapeVid", rqp.vid)
.add("exceptionMessage", ex.getMessageValue()); .add("exceptionMessage", ex.getMessageValue());
lc.log(log::WARNING, "In OStoreDB::fetchMountInfo(): failed to lock/fetch a retrieve queue. Skipping it."); lc.log(log::WARNING, "In OStoreDB::fetchMountInfo(): failed to lock/fetch a retrieve queue. Skipping it.");
continue; continue;
...@@ -262,7 +262,7 @@ void OStoreDB::fetchMountInfo(SchedulerDatabase::TapeMountDecisionInfo& tmdi, Ro ...@@ -262,7 +262,7 @@ void OStoreDB::fetchMountInfo(SchedulerDatabase::TapeMountDecisionInfo& tmdi, Ro
auto processingTime = t.secs(utils::Timer::resetCounter); auto processingTime = t.secs(utils::Timer::resetCounter);
log::ScopedParamContainer params (logContext); log::ScopedParamContainer params (logContext);
params.add("queueObject", rqp.address) params.add("queueObject", rqp.address)
.add("vid", rqp.vid) .add("tapeVid", rqp.vid)
.add("queueLockTime", queueLockTime) .add("queueLockTime", queueLockTime)
.add("queueFetchTime", queueFetchTime) .add("queueFetchTime", queueFetchTime)
.add("processingTime", processingTime); .add("processingTime", processingTime);
...@@ -412,7 +412,7 @@ void OStoreDB::trimEmptyQueues(log::LogContext& lc) { ...@@ -412,7 +412,7 @@ void OStoreDB::trimEmptyQueues(log::LogContext& lc) {
rql.release(); rql.release();
re.removeRetrieveQueueAndCommit(r.vid, QueueType::LiveJobs, lc); re.removeRetrieveQueueAndCommit(r.vid, QueueType::LiveJobs, lc);
log::ScopedParamContainer params(lc); log::ScopedParamContainer params(lc);
params.add("vid", r.vid) params.add("tapeVid", r.vid)
.add("queueObject", r.address); .add("queueObject", r.address);
lc.log(log::INFO, "In OStoreDB::trimEmptyQueues(): deleted empty retrieve queue."); lc.log(log::INFO, "In OStoreDB::trimEmptyQueues(): deleted empty retrieve queue.");
} }
...@@ -772,7 +772,7 @@ std::string OStoreDB::queueRetrieve(const cta::common::dataStructures::RetrieveR ...@@ -772,7 +772,7 @@ std::string OStoreDB::queueRetrieve(const cta::common::dataStructures::RetrieveR
uint64_t taskQueueSize = m_taskQueueSize; uint64_t taskQueueSize = m_taskQueueSize;
// Prepare the logs to avoid multithread access on the object. // Prepare the logs to avoid multithread access on the object.
log::ScopedParamContainer params(logContext); log::ScopedParamContainer params(logContext);
params.add("vid", bestVid) params.add("tapeVid", bestVid)
.add("jobObject", rReq->getAddressIfSet()) .add("jobObject", rReq->getAddressIfSet())
.add("fileId", rReq->getArchiveFile().archiveFileID) .add("fileId", rReq->getArchiveFile().archiveFileID)
.add("diskInstance", rReq->getArchiveFile().diskInstance) .add("diskInstance", rReq->getArchiveFile().diskInstance)
...@@ -817,7 +817,7 @@ std::string OStoreDB::queueRetrieve(const cta::common::dataStructures::RetrieveR ...@@ -817,7 +817,7 @@ std::string OStoreDB::queueRetrieve(const cta::common::dataStructures::RetrieveR
m_agentReference->removeFromOwnership(rReq->getAddressIfSet(), m_objectStore); m_agentReference->removeFromOwnership(rReq->getAddressIfSet(), m_objectStore);
double agOwnershipResetTime = timer.secs(cta::utils::Timer::reset_t::resetCounter); double agOwnershipResetTime = timer.secs(cta::utils::Timer::reset_t::resetCounter);
log::ScopedParamContainer params(logContext); log::ScopedParamContainer params(logContext);
params.add("vid", bestVid) params.add("tapeVid", bestVid)
.add("queueObject", owner) .add("queueObject", owner)
.add("jobObject", rReq->getAddressIfSet()) .add("jobObject", rReq->getAddressIfSet())
.add("fileId", rReq->getArchiveFile().archiveFileID) .add("fileId", rReq->getArchiveFile().archiveFileID)
...@@ -2190,13 +2190,13 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo ...@@ -2190,13 +2190,13 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
try { try {
re.removeRetrieveQueueAndCommit(mountInfo.vid, QueueType::LiveJobs, logContext); re.removeRetrieveQueueAndCommit(mountInfo.vid, QueueType::LiveJobs, logContext);
log::ScopedParamContainer params(logContext); log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid) params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet()); .add("queueObject", rq.getAddressIfSet());
logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): de-referenced missing queue from root entry"); logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): de-referenced missing queue from root entry");
} catch (RootEntry::ArchiveQueueNotEmpty & ex) { } catch (RootEntry::ArchiveQueueNotEmpty & ex) {
// TODO: improve: if we fail here we could retry to fetch a job. // TODO: improve: if we fail here we could retry to fetch a job.
log::ScopedParamContainer params(logContext); log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid) params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet()) .add("queueObject", rq.getAddressIfSet())
.add("Message", ex.getMessageValue()); .add("Message", ex.getMessageValue());
logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): could not de-referenced missing queue from root entry"); logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): could not de-referenced missing queue from root entry");
...@@ -2209,7 +2209,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo ...@@ -2209,7 +2209,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
auto queueSummaryBefore = rq.getJobsSummary(); auto queueSummaryBefore = rq.getJobsSummary();
{ {
log::ScopedParamContainer params(logContext); log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid) params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet()) .add("queueObject", rq.getAddressIfSet())
.add("queueSize", rq.getJobsSummary().files); .add("queueSize", rq.getJobsSummary().files);
logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): retrieve queue found."); logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): retrieve queue found.");
...@@ -2229,7 +2229,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo ...@@ -2229,7 +2229,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
} }
{ {
log::ScopedParamContainer params(logContext); log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid) params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet()) .add("queueObject", rq.getAddressIfSet())
.add("candidatesCount", candidateJobs.size()) .add("candidatesCount", candidateJobs.size())
.add("currentFiles", currentFiles) .add("currentFiles", currentFiles)
...@@ -2270,7 +2270,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo ...@@ -2270,7 +2270,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
(*j)->m_jobOwned = true; (*j)->m_jobOwned = true;
(*j)->m_mountId = mountInfo.mountId; (*j)->m_mountId = mountInfo.mountId;
log::ScopedParamContainer params(logContext); log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid) params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet()) .add("queueObject", rq.getAddressIfSet())
.add("requestObject", (*j)->m_retrieveRequest.getAddressIfSet()) .add("requestObject", (*j)->m_retrieveRequest.getAddressIfSet())
.add("fileId", (*j)->archiveFile.archiveFileID); .add("fileId", (*j)->archiveFile.archiveFileID);
...@@ -2285,7 +2285,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo ...@@ -2285,7 +2285,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
jobsToDequeue.emplace_back((*j)->m_retrieveRequest.getAddressIfSet()); jobsToDequeue.emplace_back((*j)->m_retrieveRequest.getAddressIfSet());
// Log the event. // Log the event.
log::ScopedParamContainer params(logContext); log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid) params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet()) .add("queueObject", rq.getAddressIfSet())
.add("requestObject", (*j)->m_retrieveRequest.getAddressIfSet()); .add("requestObject", (*j)->m_retrieveRequest.getAddressIfSet());
logContext.log(log::WARNING, "In RetrieveMount::getNextJobBatch(): skipped job not owned or not present."); logContext.log(log::WARNING, "In RetrieveMount::getNextJobBatch(): skipped job not owned or not present.");
...@@ -2296,7 +2296,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo ...@@ -2296,7 +2296,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
log::ScopedParamContainer params(logContext); log::ScopedParamContainer params(logContext);
int demangleStatus; int demangleStatus;
char * exceptionTypeStr = abi::__cxa_demangle(typeid(e).name(), nullptr, nullptr, &demangleStatus); char * exceptionTypeStr = abi::__cxa_demangle(typeid(e).name(), nullptr, nullptr, &demangleStatus);
params.add("vid", mountInfo.vid) params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet()) .add("queueObject", rq.getAddressIfSet())
.add("requestObject", (*j)->m_retrieveRequest.getAddressIfSet()); .add("requestObject", (*j)->m_retrieveRequest.getAddressIfSet());
if (!demangleStatus) { if (!demangleStatus) {
...@@ -2315,7 +2315,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo ...@@ -2315,7 +2315,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
log::ScopedParamContainer params(logContext); log::ScopedParamContainer params(logContext);
int demangleStatus; int demangleStatus;
char * exceptionTypeStr = abi::__cxa_demangle(typeid(e).name(), nullptr, nullptr, &demangleStatus); char * exceptionTypeStr = abi::__cxa_demangle(typeid(e).name(), nullptr, nullptr, &demangleStatus);
params.add("vid", mountInfo.vid) params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet()) .add("queueObject", rq.getAddressIfSet())
.add("requestObject", (*j)->m_retrieveRequest.getAddressIfSet()); .add("requestObject", (*j)->m_retrieveRequest.getAddressIfSet());
if (!demangleStatus) { if (!demangleStatus) {
...@@ -2365,12 +2365,12 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo ...@@ -2365,12 +2365,12 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
re.fetch(); re.fetch();
re.removeRetrieveQueueAndCommit(mountInfo.vid, QueueType::LiveJobs, logContext); re.removeRetrieveQueueAndCommit(mountInfo.vid, QueueType::LiveJobs, logContext);
log::ScopedParamContainer params(logContext); log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid) params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet()); .add("queueObject", rq.getAddressIfSet());
logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): deleted empty queue"); logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): deleted empty queue");
} catch (cta::exception::Exception &ex) { } catch (cta::exception::Exception &ex) {
log::ScopedParamContainer params(logContext); log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid) params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet()) .add("queueObject", rq.getAddressIfSet())
.add("Message", ex.getMessageValue()); .add("Message", ex.getMessageValue());
logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): could not delete a presumably empty queue"); logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): could not delete a presumably empty queue");
...@@ -2380,7 +2380,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo ...@@ -2380,7 +2380,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo
// We can now summarize this round // We can now summarize this round
{ {
log::ScopedParamContainer params(logContext); log::ScopedParamContainer params(logContext);
params.add("vid", mountInfo.vid) params.add("tapeVid", mountInfo.vid)
.add("queueObject", rq.getAddressIfSet()) .add("queueObject", rq.getAddressIfSet())
.add("filesAdded", currentFiles - beforeFiles) .add("filesAdded", currentFiles - beforeFiles)
.add("bytesAdded", currentBytes - beforeBytes) .add("bytesAdded", currentBytes - beforeBytes)
......
...@@ -564,7 +564,7 @@ void Scheduler::sortAndGetTapesForMountInfo(std::unique_ptr<SchedulerDatabase::T ...@@ -564,7 +564,7 @@ void Scheduler::sortAndGetTapesForMountInfo(std::unique_ptr<SchedulerDatabase::T
if (em.vid.size()) { if (em.vid.size()) {
tapesInUse.insert(em.vid); tapesInUse.insert(em.vid);
log::ScopedParamContainer params(lc); log::ScopedParamContainer params(lc);
params.add("vid", em.vid) params.add("tapeVid", em.vid)
.add("mountType", common::dataStructures::toString(em.type)) .add("mountType", common::dataStructures::toString(em.type))
.add("drive", em.driveName); .add("drive", em.driveName);
lc.log(log::DEBUG,"In Scheduler::sortAndGetTapesForMountInfo(): tapeAlreadyInUse found."); lc.log(log::DEBUG,"In Scheduler::sortAndGetTapesForMountInfo(): tapeAlreadyInUse found.");
...@@ -598,7 +598,7 @@ void Scheduler::sortAndGetTapesForMountInfo(std::unique_ptr<SchedulerDatabase::T ...@@ -598,7 +598,7 @@ void Scheduler::sortAndGetTapesForMountInfo(std::unique_ptr<SchedulerDatabase::T
log::ScopedParamContainer params(lc); log::ScopedParamContainer params(lc);
params.add("tapepool", m->tapePool); params.add("tapepool", m->tapePool);
if ( m->type == common::dataStructures::MountType::Retrieve) { if ( m->type == common::dataStructures::MountType::Retrieve) {
params.add("VID", m->vid); params.add("tapeVid", m->vid);
} }
params.add("mountType", common::dataStructures::toString(m->type)) params.add("mountType", common::dataStructures::toString(m->type))
.add("existingMounts", existingMounts) .add("existingMounts", existingMounts)
...@@ -618,7 +618,7 @@ void Scheduler::sortAndGetTapesForMountInfo(std::unique_ptr<SchedulerDatabase::T ...@@ -618,7 +618,7 @@ void Scheduler::sortAndGetTapesForMountInfo(std::unique_ptr<SchedulerDatabase::T
log::ScopedParamContainer params(lc); log::ScopedParamContainer params(lc);
params.add("tapepool", m->tapePool); params.add("tapepool", m->tapePool);
if ( m->type == common::dataStructures::MountType::Retrieve) { if ( m->type == common::dataStructures::MountType::Retrieve) {
params.add("VID", m->vid); params.add("tapeVid", m->vid);
} }
params.add("mountType", common::dataStructures::toString(m->type)) params.add("mountType", common::dataStructures::toString(m->type))
.add("existingMounts", existingMounts) .add("existingMounts", existingMounts)
...@@ -709,7 +709,7 @@ bool Scheduler::getNextMountDryRun(const std::string& logicalLibraryName, const ...@@ -709,7 +709,7 @@ bool Scheduler::getNextMountDryRun(const std::string& logicalLibraryName, const
} catch (...) {} } catch (...) {}
log::ScopedParamContainer params(lc); log::ScopedParamContainer params(lc);
params.add("tapepool", m->tapePool) params.add("tapepool", m->tapePool)
.add("vid", t.vid) .add("tapeVid", t.vid)
.add("mountType", common::dataStructures::toString(m->type)) .add("mountType", common::dataStructures::toString(m->type))
.add("existingMounts", existingMounts) .add("existingMounts", existingMounts)
.add("bytesQueued", m->bytesQueued) .add("bytesQueued", m->bytesQueued)
...@@ -743,7 +743,7 @@ bool Scheduler::getNextMountDryRun(const std::string& logicalLibraryName, const ...@@ -743,7 +743,7 @@ bool Scheduler::getNextMountDryRun(const std::string& logicalLibraryName, const
schedulerDbTime = getMountInfoTime; schedulerDbTime = getMountInfoTime;
catalogueTime = getTapeInfoTime + getTapeForWriteTime; catalogueTime = getTapeInfoTime + getTapeForWriteTime;
params.add("tapepool", m->tapePool) params.add("tapepool", m->tapePool)
.add("vid", m->vid) .add("tapeVid", m->vid)
.add("mountType", common::dataStructures::toString(m->type)) .add("mountType", common::dataStructures::toString(m->type))
.add("existingMounts", existingMounts) .add("existingMounts", existingMounts)
.add("bytesQueued", m->bytesQueued) .add("bytesQueued", m->bytesQueued)
...@@ -861,7 +861,7 @@ std::unique_ptr<TapeMount> Scheduler::getNextMount(const std::string &logicalLib ...@@ -861,7 +861,7 @@ std::unique_ptr<TapeMount> Scheduler::getNextMount(const std::string &logicalLib
catalogueTime = getTapeInfoTime + getTapeForWriteTime; catalogueTime = getTapeInfoTime + getTapeForWriteTime;
params.add("tapepool", m->tapePool) params.add("tapepool", m->tapePool)
.add("vid", t.vid) .add("tapeVid", t.vid)
.add("vo",t.vo) .add(