diff --git a/catalogue/ArchiveFileBuilder.cpp b/catalogue/ArchiveFileBuilder.cpp index 12ad96d3e8ee6d38c8b5108860ced87af12cec21..cf7cea261b0dd87d3db48712f17ae192933901f9 100644 --- a/catalogue/ArchiveFileBuilder.cpp +++ b/catalogue/ArchiveFileBuilder.cpp @@ -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("duplicateCopyNb", copyNbOfTapeFileToAppend)); 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("blockId", blockId)); m_log(cta::log::WARNING, "Found a duplicate tape copy number when listing archive files", params); diff --git a/mediachanger/MmcProxy.cpp b/mediachanger/MmcProxy.cpp index 1a8225aa9e9fd04836e52d451df6e0d4cbd9a43c..a33ff12768da307a202dfa9c33f4aa4c9a248263 100644 --- a/mediachanger/MmcProxy.cpp +++ b/mediachanger/MmcProxy.cpp @@ -34,7 +34,7 @@ MmcProxy::MmcProxy(log::Logger &log): //------------------------------------------------------------------------------ void MmcProxy::mountTapeReadOnly( const std::string &vid, const LibrarySlot &librarySlot) { std::list<log::Param> params = { - log::Param("TPVID", vid), + log::Param("tapeVid", vid), log::Param("librarySlot", librarySlot.str())}; 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 //------------------------------------------------------------------------------ void MmcProxy::mountTapeReadWrite(const std::string &vid, const LibrarySlot &librarySlot) { std::list<log::Param> params = { - log::Param("TPVID", vid), + log::Param("tapeVid", vid), log::Param("librarySlot", librarySlot.str())}; 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 //------------------------------------------------------------------------------ void MmcProxy::dismountTape( const std::string &vid, const LibrarySlot &librarySlot) { std::list<log::Param> params = { - log::Param("TPVID", vid), + log::Param("tapeVid", vid), log::Param("librarySlot", librarySlot.str())}; m_log(log::WARNING, "Tape should be manual dismounted", params); } @@ -64,7 +64,7 @@ void MmcProxy::dismountTape( const std::string &vid, const LibrarySlot &libraryS //------------------------------------------------------------------------------ void MmcProxy::forceDismountTape(const std::string &vid, const LibrarySlot &librarySlot) { std::list<log::Param> params = { - log::Param("TPVID", vid), + log::Param("tapeVid", vid), log::Param("librarySlot", librarySlot.str())}; m_log(log::WARNING, "Tape should be manual dismounted", params); } diff --git a/mediachanger/acs/daemon/AcsMessageHandler.cpp b/mediachanger/acs/daemon/AcsMessageHandler.cpp index 071b419cb2a1af0c82a15408a6ea9972ba59a67f..2d9af754b90b7340c4547a2aca4f74795be2b11b 100644 --- a/mediachanger/acs/daemon/AcsMessageHandler.cpp +++ b/mediachanger/acs/daemon/AcsMessageHandler.cpp @@ -232,7 +232,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler:: const uint32_t panel = rqstBody.panel(); 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("lsm", lsm), log::Param("panel", panel), @@ -277,7 +277,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler:: const uint32_t panel = rqstBody.panel(); 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("lsm", lsm), log::Param("panel", panel), @@ -322,7 +322,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler:: const uint32_t panel = rqstBody.panel(); 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("lsm", lsm), log::Param("panel", panel), @@ -371,7 +371,7 @@ cta::mediachanger::Frame cta::mediachanger::acs::daemon::AcsMessageHandler:: const uint32_t panel = rqstBody.panel(); 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("lsm", lsm), log::Param("panel", panel), diff --git a/mediachanger/acs/daemon/AcsPendingRequests.cpp b/mediachanger/acs/daemon/AcsPendingRequests.cpp index d24c25cdb8ca6bfb0f93220e67a6bcfd41082d14..16025a007882a4d83698d7cb41895192ff76cba4 100644 --- a/mediachanger/acs/daemon/AcsPendingRequests.cpp +++ b/mediachanger/acs/daemon/AcsPendingRequests.cpp @@ -121,7 +121,7 @@ void cta::mediachanger::acs::daemon::AcsPendingRequests::handleCompletedRequests itor != m_acsRequestList.end();itor++) { cta::mediachanger::acs::daemon::AcsRequest *const acsRequest = *itor; 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("lsm", acsRequest->getLsm()), log::Param("panel", acsRequest->getPanel()), @@ -143,7 +143,7 @@ void cta::mediachanger::acs::daemon::AcsPendingRequests::handleFailedRequests() itor != m_acsRequestList.end();itor++) { cta::mediachanger::acs::daemon::AcsRequest *const acsRequest = *itor; 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("lsm", acsRequest->getLsm()), log::Param("panel", acsRequest->getPanel()), @@ -231,7 +231,7 @@ void cta::mediachanger::acs::daemon::AcsPendingRequests::checkAndAddRequestDismo 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("lsm", lsm), log::Param("panel", panel), diff --git a/objectstore/GarbageCollector.cpp b/objectstore/GarbageCollector.cpp index 45f63f7c16c093bf4b9fa50cf05b8391aea5d450..a2add900d1fbda2ab48e46fa4e1cad56104023e7 100644 --- a/objectstore/GarbageCollector.cpp +++ b/objectstore/GarbageCollector.cpp @@ -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; } } params3.add("fileId", rr->getArchiveFile().archiveFileID) .add("copyNb", copyNb) - .add("vid", vid) + .add("tapeVid", vid) .add("fSeq", fSeq); lc.log(log::INFO, "Selected vid to be requeued for retrieve request."); break; @@ -626,7 +626,7 @@ void GarbageCollector::OwnedObjectSorter::lockFetchAndUpdateRetrieveJobs(Agent& params.add("retrieveRequestObject", rrup.retrieveRequest->getAddressIfSet()) .add("copyNb", rrup.copyNb) .add("fileId", rrup.retrieveRequest->getArchiveFile().archiveFileID) - .add("vid", tape.first) + .add("tapeVid", tape.first) .add("retreveQueueObject", rq.getAddressIfSet()) .add("garbageCollectedPreviousOwner", agent.getAddressIfSet()); lc.log(log::INFO, "In GarbageCollector::OwnedObjectSorter::lockFetchAndUpdateRetrieveJobs(): requeued retrieve job."); @@ -675,7 +675,7 @@ void GarbageCollector::OwnedObjectSorter::lockFetchAndUpdateRetrieveJobs(Agent& { log::ScopedParamContainer params(lc); auto jobsSummary = rq.getJobsSummary(); - params.add("vid", tape.first) + params.add("tapeVid", tape.first) .add("retrieveQueueObject", rq.getAddressIfSet()) .add("filesAdded", filesQueued - filesDequeued) .add("bytesAdded", bytesQueued - bytesDequeued) diff --git a/objectstore/Helpers.cpp b/objectstore/Helpers.cpp index 5ae488180d58f18ebba0624243335551cfa226d9..b583f9729ad5156304127a3021c9bf2718e7e7f6 100644 --- a/objectstore/Helpers.cpp +++ b/objectstore/Helpers.cpp @@ -229,7 +229,7 @@ void Helpers::getLockedAndFetchedQueue<RetrieveQueue>(RetrieveQueue& retrieveQue rootQueueDereferenceTime += t.secs(utils::Timer::resetCounter); log::ScopedParamContainer params(lc); - params.add("vid", vid) + params.add("tapeVid", vid) .add("queueObject", retrieveQueue.getAddressIfSet()) .add("exceptionMsg", ex.getMessageValue()); lc.log(log::INFO, "In Helpers::getLockedAndFetchedQueue<RetrieveQueue>(): removed reference to gone retrieve queue from root entry."); diff --git a/objectstore/RetrieveRequest.cpp b/objectstore/RetrieveRequest.cpp index ca196c23620a90dccd1aa147c3e5735c4b382b4a..8102a0a5ccbb8b932be9cf6bb50242b7b150eaa8 100644 --- a/objectstore/RetrieveRequest.cpp +++ b/objectstore/RetrieveRequest.cpp @@ -158,7 +158,7 @@ jobFound:; params.add("jobObject", getAddressIfSet()) .add("queueObject", rq.getAddressIfSet()) .add("copynb", bestTapeFile->copynb()) - .add("vid", bestTapeFile->vid()) + .add("tapeVid", bestTapeFile->vid()) .add("tapeSelectionTime", tapeSelectionTime) .add("queueUpdateTime", queueUpdateTime) .add("commitUnlockQueueTime", commitUnlockQueueTime); @@ -181,7 +181,7 @@ jobFound:; params.add("jobObject", getAddressIfSet()) .add("queueObject", rq.getAddressIfSet()) .add("copynb", bestTapeFile->copynb()) - .add("vid", bestTapeFile->vid()) + .add("tapeVid", bestTapeFile->vid()) .add("tapeSelectionTime", tapeSelectionTime) .add("queueUpdateTime", queueUpdateTime) .add("commitUnlockQueueTime", commitUnlockQueueTime) diff --git a/objectstore/RootEntry.cpp b/objectstore/RootEntry.cpp index 80663acc764772c899fe746c8f15838023563859..e73caa654dabd50e67107462a67898a09e68b1de 100644 --- a/objectstore/RootEntry.cpp +++ b/objectstore/RootEntry.cpp @@ -380,7 +380,7 @@ void RootEntry::removeRetrieveQueueAndCommit(const std::string& vid, QueueType q commit(); { log::ScopedParamContainer params(lc); - params.add("vid", vid); + params.add("tapeVid", vid); lc.log(log::INFO, "In RootEntry::removeRetrieveQueueAndCommit(): removed retrieve queue reference."); } } catch (serializers::NotFound &) { diff --git a/scheduler/OStoreDB/MemQueues.hpp b/scheduler/OStoreDB/MemQueues.hpp index 29fa08d89a7b22dd2b970d210c5614a0403dbbc8..a53fd551f6e997ff7ccb3a957fed868126b2120e 100644 --- a/scheduler/OStoreDB/MemQueues.hpp +++ b/scheduler/OStoreDB/MemQueues.hpp @@ -340,7 +340,7 @@ std::shared_ptr<SharedQueueLock<Queue, Request>> MemQueue<Request, Queue>::share .add("tapepool", queueIndex); } else if (typeid(Queue) == typeid(objectstore::RetrieveQueue)) { params.add("type", "Retrieve") - .add("vid", queueIndex); + .add("tapeVid", queueIndex); } params.add("objectQueue", queue.getAddressIfSet()) .add("jobsBefore", qJobsBefore) diff --git a/scheduler/OStoreDB/OStoreDB.cpp b/scheduler/OStoreDB/OStoreDB.cpp index d8c8db62a7bbf1d9712ac8250069d90b4ad92a35..a4fff167c50f982c5ac87ca6f61b225ad19fc476 100644 --- a/scheduler/OStoreDB/OStoreDB.cpp +++ b/scheduler/OStoreDB/OStoreDB.cpp @@ -237,7 +237,7 @@ void OStoreDB::fetchMountInfo(SchedulerDatabase::TapeMountDecisionInfo& tmdi, Ro log::LogContext lc(m_logger); log::ScopedParamContainer params (lc); params.add("queueObject", rqp.address) - .add("vid", rqp.vid) + .add("tapeVid", rqp.vid) .add("exceptionMessage", ex.getMessageValue()); lc.log(log::WARNING, "In OStoreDB::fetchMountInfo(): failed to lock/fetch a retrieve queue. Skipping it."); continue; @@ -262,7 +262,7 @@ void OStoreDB::fetchMountInfo(SchedulerDatabase::TapeMountDecisionInfo& tmdi, Ro auto processingTime = t.secs(utils::Timer::resetCounter); log::ScopedParamContainer params (logContext); params.add("queueObject", rqp.address) - .add("vid", rqp.vid) + .add("tapeVid", rqp.vid) .add("queueLockTime", queueLockTime) .add("queueFetchTime", queueFetchTime) .add("processingTime", processingTime); @@ -412,7 +412,7 @@ void OStoreDB::trimEmptyQueues(log::LogContext& lc) { rql.release(); re.removeRetrieveQueueAndCommit(r.vid, QueueType::LiveJobs, lc); log::ScopedParamContainer params(lc); - params.add("vid", r.vid) + params.add("tapeVid", r.vid) .add("queueObject", r.address); lc.log(log::INFO, "In OStoreDB::trimEmptyQueues(): deleted empty retrieve queue."); } @@ -772,7 +772,7 @@ std::string OStoreDB::queueRetrieve(const cta::common::dataStructures::RetrieveR uint64_t taskQueueSize = m_taskQueueSize; // Prepare the logs to avoid multithread access on the object. log::ScopedParamContainer params(logContext); - params.add("vid", bestVid) + params.add("tapeVid", bestVid) .add("jobObject", rReq->getAddressIfSet()) .add("fileId", rReq->getArchiveFile().archiveFileID) .add("diskInstance", rReq->getArchiveFile().diskInstance) @@ -817,7 +817,7 @@ std::string OStoreDB::queueRetrieve(const cta::common::dataStructures::RetrieveR m_agentReference->removeFromOwnership(rReq->getAddressIfSet(), m_objectStore); double agOwnershipResetTime = timer.secs(cta::utils::Timer::reset_t::resetCounter); log::ScopedParamContainer params(logContext); - params.add("vid", bestVid) + params.add("tapeVid", bestVid) .add("queueObject", owner) .add("jobObject", rReq->getAddressIfSet()) .add("fileId", rReq->getArchiveFile().archiveFileID) @@ -2190,13 +2190,13 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo try { re.removeRetrieveQueueAndCommit(mountInfo.vid, QueueType::LiveJobs, logContext); log::ScopedParamContainer params(logContext); - params.add("vid", mountInfo.vid) + params.add("tapeVid", mountInfo.vid) .add("queueObject", rq.getAddressIfSet()); logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): de-referenced missing queue from root entry"); } catch (RootEntry::ArchiveQueueNotEmpty & ex) { // TODO: improve: if we fail here we could retry to fetch a job. log::ScopedParamContainer params(logContext); - params.add("vid", mountInfo.vid) + params.add("tapeVid", mountInfo.vid) .add("queueObject", rq.getAddressIfSet()) .add("Message", ex.getMessageValue()); 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 auto queueSummaryBefore = rq.getJobsSummary(); { log::ScopedParamContainer params(logContext); - params.add("vid", mountInfo.vid) + params.add("tapeVid", mountInfo.vid) .add("queueObject", rq.getAddressIfSet()) .add("queueSize", rq.getJobsSummary().files); logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): retrieve queue found."); @@ -2229,7 +2229,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo } { log::ScopedParamContainer params(logContext); - params.add("vid", mountInfo.vid) + params.add("tapeVid", mountInfo.vid) .add("queueObject", rq.getAddressIfSet()) .add("candidatesCount", candidateJobs.size()) .add("currentFiles", currentFiles) @@ -2270,7 +2270,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo (*j)->m_jobOwned = true; (*j)->m_mountId = mountInfo.mountId; log::ScopedParamContainer params(logContext); - params.add("vid", mountInfo.vid) + params.add("tapeVid", mountInfo.vid) .add("queueObject", rq.getAddressIfSet()) .add("requestObject", (*j)->m_retrieveRequest.getAddressIfSet()) .add("fileId", (*j)->archiveFile.archiveFileID); @@ -2285,7 +2285,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo jobsToDequeue.emplace_back((*j)->m_retrieveRequest.getAddressIfSet()); // Log the event. log::ScopedParamContainer params(logContext); - params.add("vid", mountInfo.vid) + params.add("tapeVid", mountInfo.vid) .add("queueObject", rq.getAddressIfSet()) .add("requestObject", (*j)->m_retrieveRequest.getAddressIfSet()); 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 log::ScopedParamContainer params(logContext); int 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("requestObject", (*j)->m_retrieveRequest.getAddressIfSet()); if (!demangleStatus) { @@ -2315,7 +2315,7 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo log::ScopedParamContainer params(logContext); int 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("requestObject", (*j)->m_retrieveRequest.getAddressIfSet()); if (!demangleStatus) { @@ -2365,12 +2365,12 @@ std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob> > OStoreDB::RetrieveMo re.fetch(); re.removeRetrieveQueueAndCommit(mountInfo.vid, QueueType::LiveJobs, logContext); log::ScopedParamContainer params(logContext); - params.add("vid", mountInfo.vid) + params.add("tapeVid", mountInfo.vid) .add("queueObject", rq.getAddressIfSet()); logContext.log(log::INFO, "In RetrieveMount::getNextJobBatch(): deleted empty queue"); } catch (cta::exception::Exception &ex) { log::ScopedParamContainer params(logContext); - params.add("vid", mountInfo.vid) + params.add("tapeVid", mountInfo.vid) .add("queueObject", rq.getAddressIfSet()) .add("Message", ex.getMessageValue()); 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 // We can now summarize this round { log::ScopedParamContainer params(logContext); - params.add("vid", mountInfo.vid) + params.add("tapeVid", mountInfo.vid) .add("queueObject", rq.getAddressIfSet()) .add("filesAdded", currentFiles - beforeFiles) .add("bytesAdded", currentBytes - beforeBytes) diff --git a/scheduler/Scheduler.cpp b/scheduler/Scheduler.cpp index c577aa0948c24ca97edaf64687ad6c10c88350b6..38595b3afc8182538b0a8397323f61ff9976dac4 100644 --- a/scheduler/Scheduler.cpp +++ b/scheduler/Scheduler.cpp @@ -564,7 +564,7 @@ void Scheduler::sortAndGetTapesForMountInfo(std::unique_ptr<SchedulerDatabase::T if (em.vid.size()) { tapesInUse.insert(em.vid); log::ScopedParamContainer params(lc); - params.add("vid", em.vid) + params.add("tapeVid", em.vid) .add("mountType", common::dataStructures::toString(em.type)) .add("drive", em.driveName); lc.log(log::DEBUG,"In Scheduler::sortAndGetTapesForMountInfo(): tapeAlreadyInUse found."); @@ -598,7 +598,7 @@ void Scheduler::sortAndGetTapesForMountInfo(std::unique_ptr<SchedulerDatabase::T log::ScopedParamContainer params(lc); params.add("tapepool", m->tapePool); 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)) .add("existingMounts", existingMounts) @@ -618,7 +618,7 @@ void Scheduler::sortAndGetTapesForMountInfo(std::unique_ptr<SchedulerDatabase::T log::ScopedParamContainer params(lc); params.add("tapepool", m->tapePool); 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)) .add("existingMounts", existingMounts) @@ -709,7 +709,7 @@ bool Scheduler::getNextMountDryRun(const std::string& logicalLibraryName, const } catch (...) {} log::ScopedParamContainer params(lc); params.add("tapepool", m->tapePool) - .add("vid", t.vid) + .add("tapeVid", t.vid) .add("mountType", common::dataStructures::toString(m->type)) .add("existingMounts", existingMounts) .add("bytesQueued", m->bytesQueued) @@ -743,7 +743,7 @@ bool Scheduler::getNextMountDryRun(const std::string& logicalLibraryName, const schedulerDbTime = getMountInfoTime; catalogueTime = getTapeInfoTime + getTapeForWriteTime; params.add("tapepool", m->tapePool) - .add("vid", m->vid) + .add("tapeVid", m->vid) .add("mountType", common::dataStructures::toString(m->type)) .add("existingMounts", existingMounts) .add("bytesQueued", m->bytesQueued) @@ -861,7 +861,7 @@ std::unique_ptr<TapeMount> Scheduler::getNextMount(const std::string &logicalLib catalogueTime = getTapeInfoTime + getTapeForWriteTime; params.add("tapepool", m->tapePool) - .add("vid", t.vid) + .add("tapeVid", t.vid) .add("vo",t.vo) .add("mediaType",t.mediaType) .add("vendor",t.vendor) @@ -926,7 +926,7 @@ std::unique_ptr<TapeMount> Scheduler::getNextMount(const std::string &logicalLib schedulerDbTime = getMountInfoTime + queueTrimingTime + mountCreationTime + driveStatusSetTime; catalogueTime = getTapeInfoTime + getTapeForWriteTime; params.add("tapepool", m->tapePool) - .add("vid", m->vid) + .add("tapeVid", m->vid) .add("vo",m->vo) .add("mediaType",m->mediaType) .add("vendor",m->vendor) diff --git a/tapeserver/castor/tape/tapeserver/daemon/CleanerSession.cpp b/tapeserver/castor/tape/tapeserver/daemon/CleanerSession.cpp index df82a86b18fdb2526edc77e6aa27be9295e69b06..41336f6210f70a30be46b0a9e7f273d454614a1c 100644 --- a/tapeserver/castor/tape/tapeserver/daemon/CleanerSession.cpp +++ b/tapeserver/castor/tape/tapeserver/daemon/CleanerSession.cpp @@ -65,8 +65,8 @@ castor::tape::tapeserver::daemon::Session::EndOfSessionAction // Reaching this point means the cleaner failed and an exception was thrown std::list<cta::log::Param> params = { - cta::log::Param("TPVID", m_vid), - cta::log::Param("unitName", m_driveConfig.unitName), + cta::log::Param("tapeVid", m_vid), + cta::log::Param("tapeDrive", m_driveConfig.unitName), cta::log::Param("message", errorMessage)}; m_log(cta::log::ERR, "Cleaner failed", params); return MARK_DRIVE_AS_DOWN; @@ -104,8 +104,8 @@ void castor::tape::tapeserver::daemon::CleanerSession::cleanDrive(drive::DriveIn if(!drive.hasTapeInPlace()) { std::list<cta::log::Param> params; - params.push_back(cta::log::Param("TPVID", m_vid)); - params.push_back(cta::log::Param("unitName", m_driveConfig.unitName)); + params.push_back(cta::log::Param("tapeVid", m_vid)); + params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName)); m_log(cta::log::INFO, "Cleaner found tape drive empty", params); return; //return immediately if there is no tape } @@ -155,8 +155,8 @@ void castor::tape::tapeserver::daemon::CleanerSession::logAndClearTapeAlerts(dri // Reaching this point means it failed and an exception was thrown (because of the "return" above) std::list<cta::log::Param> params = { - cta::log::Param("TPVID", m_vid), - cta::log::Param("unitName", m_driveConfig.unitName), + cta::log::Param("tapeVid", m_vid), + cta::log::Param("tapeDrive", m_driveConfig.unitName), cta::log::Param("message", errorMessage)}; m_log(cta::log::ERR, "Cleaner failed getting tape alerts from the drive", params); } @@ -202,8 +202,8 @@ std::unique_ptr<castor::tape::tapeserver::drive::DriveInterface> void castor::tape::tapeserver::daemon::CleanerSession::waitUntilMediaIsReady( drive::DriveInterface &drive) { std::list<cta::log::Param> params; - params.push_back(cta::log::Param("TPVID", m_vid)); - params.push_back(cta::log::Param("unitName", m_driveConfig.unitName)); + params.push_back(cta::log::Param("tapeVid", m_vid)); + params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName)); params.push_back(cta::log::Param("waitMediaInDriveTimeout", m_waitMediaInDriveTimeout)); @@ -224,8 +224,8 @@ void castor::tape::tapeserver::daemon::CleanerSession::waitUntilMediaIsReady( void castor::tape::tapeserver::daemon::CleanerSession::rewindDrive( drive::DriveInterface &drive) { std::list<cta::log::Param> params; - params.push_back(cta::log::Param("TPVID", m_vid)); - params.push_back(cta::log::Param("unitName", m_driveConfig.unitName)); + params.push_back(cta::log::Param("tapeVid", m_vid)); + params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName)); m_log(cta::log::INFO, "Cleaner rewinding tape", params); drive.rewind(); @@ -238,8 +238,8 @@ void castor::tape::tapeserver::daemon::CleanerSession::rewindDrive( void castor::tape::tapeserver::daemon::CleanerSession::checkTapeContainsData( drive::DriveInterface &drive) { std::list<cta::log::Param> params; - params.push_back(cta::log::Param("TPVID", m_vid)); - params.push_back(cta::log::Param("unitName", m_driveConfig.unitName)); + params.push_back(cta::log::Param("tapeVid", m_vid)); + params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName)); m_log(cta::log::INFO, "Cleaner checking tape contains data", params); if(drive.isTapeBlank()) { @@ -257,8 +257,8 @@ std::string castor::tape::tapeserver::daemon::CleanerSession::checkVolumeLabel( drive::DriveInterface &drive) { tapeFile::VOL1 vol1; std::list<cta::log::Param> params; - params.push_back(cta::log::Param("TPVID", m_vid)); - params.push_back(cta::log::Param("unitName", m_driveConfig.unitName)); + params.push_back(cta::log::Param("tapeVid", m_vid)); + params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName)); try { drive.readExactBlock((void * )&vol1, sizeof(vol1), @@ -296,8 +296,8 @@ void castor::tape::tapeserver::daemon::CleanerSession::unloadTape( const std::string &vid, drive::DriveInterface &drive) { const cta::mediachanger::LibrarySlot &librarySlot = m_driveConfig.librarySlot(); std::list<cta::log::Param> params; - params.push_back(cta::log::Param("TPVID", vid)); - params.push_back(cta::log::Param("unitName", m_driveConfig.unitName)); + params.push_back(cta::log::Param("tapeVid", vid)); + params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName)); params.push_back(cta::log::Param("librarySlot", librarySlot.str())); // We implement the same policy as with the tape sessions: @@ -327,8 +327,8 @@ void castor::tape::tapeserver::daemon::CleanerSession::dismountTape( const std::string &vid) { const cta::mediachanger::LibrarySlot &librarySlot = m_driveConfig.librarySlot(); std::list<cta::log::Param> params; - params.push_back(cta::log::Param("TPVID", vid)); - params.push_back(cta::log::Param("unitName", m_driveConfig.unitName)); + params.push_back(cta::log::Param("tapeVid", vid)); + params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName)); params.push_back(cta::log::Param("librarySlot", librarySlot.str())); try { diff --git a/tapeserver/castor/tape/tapeserver/daemon/EmptyDriveProbe.cpp b/tapeserver/castor/tape/tapeserver/daemon/EmptyDriveProbe.cpp index 6897faf0c07103f52f8656a61da97b9e2715044d..d32133e03c39a829697a77add17eeb7b720d93b7 100644 --- a/tapeserver/castor/tape/tapeserver/daemon/EmptyDriveProbe.cpp +++ b/tapeserver/castor/tape/tapeserver/daemon/EmptyDriveProbe.cpp @@ -53,7 +53,7 @@ bool castor::tape::tapeserver::daemon::EmptyDriveProbe::driveIsEmpty() throw() { // Reaching this point means the probe failed and an exception was thrown std::list<cta::log::Param> params = { - cta::log::Param("unitName", m_driveConfig.unitName), + cta::log::Param("tapeDrive", m_driveConfig.unitName), cta::log::Param("message", errorMessage)}; m_log(cta::log::ERR, "Probe failed", params); return false; @@ -65,7 +65,7 @@ bool castor::tape::tapeserver::daemon::EmptyDriveProbe::driveIsEmpty() throw() { bool castor::tape::tapeserver::daemon::EmptyDriveProbe:: exceptionThrowingDriveIsEmpty() { std::list<cta::log::Param> params; - params.push_back(cta::log::Param("unitName", m_driveConfig.unitName)); + params.push_back(cta::log::Param("tapeDrive", m_driveConfig.unitName)); std::unique_ptr<drive::DriveInterface> drivePtr = createDrive(); drive::DriveInterface &drive = *drivePtr.get(); diff --git a/tapeserver/castor/tape/tapeserver/daemon/LabelSession.cpp b/tapeserver/castor/tape/tapeserver/daemon/LabelSession.cpp index 03ce43e22bedcd4a7331f3193ef2d41f2d626098..3b439972684b43c96767910bb3bab47167569bf1 100644 --- a/tapeserver/castor/tape/tapeserver/daemon/LabelSession.cpp +++ b/tapeserver/castor/tape/tapeserver/daemon/LabelSession.cpp @@ -82,8 +82,8 @@ castor::tape::tapeserver::daemon::Session::EndOfSessionAction std::list<cta::log::Param> params; params.push_back(cta::log::Param("uid", m_request.uid)); params.push_back(cta::log::Param("gid", m_request.gid)); - params.push_back(cta::log::Param("TPVID", m_request.vid)); - params.push_back(cta::log::Param("unitName", m_request.drive)); + params.push_back(cta::log::Param("tapeVid", m_request.vid)); + params.push_back(cta::log::Param("tapeDrive", m_request.drive)); params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary)); params.push_back(cta::log::Param("force", boolToStr(m_force))); params.push_back(cta::log::Param("lbp", boolToStr(m_lbp))); @@ -111,8 +111,8 @@ castor::tape::tapeserver::daemon::Session::EndOfSessionAction std::list<cta::log::Param> params; params.push_back(cta::log::Param("uid", m_request.uid)); params.push_back(cta::log::Param("gid", m_request.gid)); - params.push_back(cta::log::Param("TPVID", m_request.vid)); - params.push_back(cta::log::Param("unitName", m_request.drive)); + params.push_back(cta::log::Param("tapeVid", m_request.vid)); + params.push_back(cta::log::Param("tapeDrive", m_request.drive)); params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary)); params.push_back(cta::log::Param("force", boolToStr(m_force))); params.push_back(cta::log::Param("lbp", boolToStr(m_lbp))); @@ -174,8 +174,8 @@ void castor::tape::tapeserver::daemon::LabelSession::setProcessCapabilities( std::list<cta::log::Param> params; params.push_back(cta::log::Param("uid", m_request.uid)); params.push_back(cta::log::Param("gid", m_request.gid)); - params.push_back(cta::log::Param("TPVID", m_request.vid)); - params.push_back(cta::log::Param("unitName", m_request.drive)); + params.push_back(cta::log::Param("tapeVid", m_request.vid)); + params.push_back(cta::log::Param("tapeDrive", m_request.drive)); params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary)); params.push_back(cta::log::Param("force", boolToStr(m_force))); params.push_back(cta::log::Param("lbp", boolToStr(m_lbp))); @@ -215,8 +215,8 @@ void castor::tape::tapeserver::daemon::LabelSession::mountTape() { std::list<cta::log::Param> params; params.push_back(cta::log::Param("uid", m_request.uid)); params.push_back(cta::log::Param("gid", m_request.gid)); - params.push_back(cta::log::Param("TPVID", m_request.vid)); - params.push_back(cta::log::Param("unitName", m_request.drive)); + params.push_back(cta::log::Param("tapeVid", m_request.vid)); + params.push_back(cta::log::Param("tapeDrive", m_request.drive)); params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary)); params.push_back(cta::log::Param("force", boolToStr(m_force))); params.push_back(cta::log::Param("lbp", boolToStr(m_lbp))); @@ -240,8 +240,8 @@ void castor::tape::tapeserver::daemon::LabelSession::waitUntilTapeLoaded( std::list<cta::log::Param> params; params.push_back(cta::log::Param("uid", m_request.uid)); params.push_back(cta::log::Param("gid", m_request.gid)); - params.push_back(cta::log::Param("TPVID", m_request.vid)); - params.push_back(cta::log::Param("unitName", m_request.drive)); + params.push_back(cta::log::Param("tapeVid", m_request.vid)); + params.push_back(cta::log::Param("tapeDrive", m_request.drive)); params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary)); params.push_back(cta::log::Param("force", boolToStr(m_force))); params.push_back(cta::log::Param("lbp", boolToStr(m_lbp))); @@ -265,8 +265,8 @@ void castor::tape::tapeserver::daemon::LabelSession::rewindDrive( std::list<cta::log::Param> params; params.push_back(cta::log::Param("uid", m_request.uid)); params.push_back(cta::log::Param("gid", m_request.gid)); - params.push_back(cta::log::Param("TPVID", m_request.vid)); - params.push_back(cta::log::Param("unitName", m_request.drive)); + params.push_back(cta::log::Param("tapeVid", m_request.vid)); + params.push_back(cta::log::Param("tapeDrive", m_request.drive)); params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary)); params.push_back(cta::log::Param("force", boolToStr(m_force))); params.push_back(cta::log::Param("lbp", boolToStr(m_lbp))); @@ -284,8 +284,8 @@ void castor::tape::tapeserver::daemon::LabelSession:: std::list<cta::log::Param> params; params.push_back(cta::log::Param("uid", m_request.uid)); params.push_back(cta::log::Param("gid", m_request.gid)); - params.push_back(cta::log::Param("TPVID", m_request.vid)); - params.push_back(cta::log::Param("unitName", m_request.drive)); + params.push_back(cta::log::Param("tapeVid", m_request.vid)); + params.push_back(cta::log::Param("tapeDrive", m_request.drive)); params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary)); params.push_back(cta::log::Param("force", boolToStr(m_force))); params.push_back(cta::log::Param("lbp", boolToStr(m_lbp))); @@ -303,8 +303,8 @@ void castor::tape::tapeserver::daemon::LabelSession::writeLabelToTape( std::list<cta::log::Param> params; params.push_back(cta::log::Param("uid", m_request.uid)); params.push_back(cta::log::Param("gid", m_request.gid)); - params.push_back(cta::log::Param("TPVID", m_request.vid)); - params.push_back(cta::log::Param("unitName", m_request.drive)); + params.push_back(cta::log::Param("tapeVid", m_request.vid)); + params.push_back(cta::log::Param("tapeDrive", m_request.drive)); params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary)); params.push_back(cta::log::Param("force", boolToStr(m_force))); params.push_back(cta::log::Param("lbp", boolToStr(m_lbp))); @@ -325,8 +325,8 @@ void castor::tape::tapeserver::daemon::LabelSession::writeLabelWithLbpToTape( std::list<cta::log::Param> params; params.push_back(cta::log::Param("uid", m_request.uid)); params.push_back(cta::log::Param("gid", m_request.gid)); - params.push_back(cta::log::Param("TPVID", m_request.vid)); - params.push_back(cta::log::Param("unitName", m_request.drive)); + params.push_back(cta::log::Param("tapeVid", m_request.vid)); + params.push_back(cta::log::Param("tapeDrive", m_request.drive)); params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary)); params.push_back(cta::log::Param("force", boolToStr(m_force))); params.push_back(cta::log::Param("lbp", boolToStr(m_lbp))); @@ -347,8 +347,8 @@ void castor::tape::tapeserver::daemon::LabelSession::unloadTape( std::list<cta::log::Param> params; params.push_back(cta::log::Param("uid", m_request.uid)); params.push_back(cta::log::Param("gid", m_request.gid)); - params.push_back(cta::log::Param("TPVID", m_request.vid)); - params.push_back(cta::log::Param("unitName", m_request.drive)); + params.push_back(cta::log::Param("tapeVid", m_request.vid)); + params.push_back(cta::log::Param("tapeDrive", m_request.drive)); params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary)); params.push_back(cta::log::Param("force", boolToStr(m_force))); params.push_back(cta::log::Param("lbp", boolToStr(m_lbp))); @@ -383,8 +383,8 @@ void castor::tape::tapeserver::daemon::LabelSession::dismountTape( std::list<cta::log::Param> params; params.push_back(cta::log::Param("uid", m_request.uid)); params.push_back(cta::log::Param("gid", m_request.gid)); - params.push_back(cta::log::Param("TPVID", m_request.vid)); - params.push_back(cta::log::Param("unitName", m_request.drive)); + params.push_back(cta::log::Param("tapeVid", m_request.vid)); + params.push_back(cta::log::Param("tapeDrive", m_request.drive)); params.push_back(cta::log::Param("logicalLibrary", m_request.logicalLibrary)); params.push_back(cta::log::Param("force", boolToStr(m_force))); params.push_back(cta::log::Param("lbp", boolToStr(m_lbp))); diff --git a/tapeserver/castor/tape/tapeserver/daemon/TapeReadSingleThread.cpp b/tapeserver/castor/tape/tapeserver/daemon/TapeReadSingleThread.cpp index 1638a11451b741167b427522d40484f8ba8b3d98..7b629f1a2ea2913ffed79139decd459ec51ac7df 100644 --- a/tapeserver/castor/tape/tapeserver/daemon/TapeReadSingleThread.cpp +++ b/tapeserver/castor/tape/tapeserver/daemon/TapeReadSingleThread.cpp @@ -390,7 +390,7 @@ void castor::tape::tapeserver::daemon::TapeReadSingleThread::run() { void castor::tape::tapeserver::daemon::TapeReadSingleThread::logWithStat( int level, const std::string& msg, cta::log::ScopedParamContainer& params) { params.add("type", "read") - .add("vid", m_volInfo.vid) + .add("tapeVid", m_volInfo.vid) .add("mountTime", m_stats.mountTime) .add("positionTime", m_stats.positionTime) .add("waitInstructionsTime", m_stats.waitInstructionsTime) diff --git a/tapeserver/castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp b/tapeserver/castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp index ccebc7b5582a7d50a59946f0409e9d90d12a918e..facefe53460b38112447656d24d2104872e4ad73 100644 --- a/tapeserver/castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp +++ b/tapeserver/castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp @@ -523,7 +523,7 @@ void castor::tape::tapeserver::daemon::TapeWriteSingleThread::run() { void castor::tape::tapeserver::daemon::TapeWriteSingleThread::logWithStats( int level,const std::string& msg, cta::log::ScopedParamContainer& params){ params.add("type", "write") - .add("TPVID", m_volInfo.vid) + .add("tapeVid", m_volInfo.vid) .add("mountTime", m_stats.mountTime) .add("positionTime", m_stats.positionTime) .add("waitInstructionsTime", m_stats.waitInstructionsTime) diff --git a/tapeserver/cta-taped.cpp b/tapeserver/cta-taped.cpp index db77447f8ed00428af4b326b7f4601f07ae53f13..86122df7c03c0b46c9dd07cb0562683687137608 100644 --- a/tapeserver/cta-taped.cpp +++ b/tapeserver/cta-taped.cpp @@ -180,7 +180,7 @@ void logStartOfDaemon(cta::log::Logger &log, //static void logTpconfigLine(cta::log::Logger &log, // const cta::tape::daemon::TpconfigLine &line) { // std::list<cta::log::Param> params = { -// cta::log::Param("unitName", line.unitName), +// cta::log::Param("tapeDrive", line.unitName), // cta::log::Param("logicalLibrary", line.logicalLibrary), // cta::log::Param("devFilename", line.devFilename), // cta::log::Param("librarySlot", line.librarySlot)}; diff --git a/tapeserver/daemon/DriveHandler.cpp b/tapeserver/daemon/DriveHandler.cpp index cd35ce14d86026567ee5b37a27d4502ae729fa20..683b6121d79c2b49fa703383106768b6a596c501 100644 --- a/tapeserver/daemon/DriveHandler.cpp +++ b/tapeserver/daemon/DriveHandler.cpp @@ -165,7 +165,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::fork() { } } catch (cta::exception::Exception & ex) { cta::log::ScopedParamContainer params(m_processManager.logContext()); - params.add("unitName", m_configLine.unitName) + params.add("tapeDrive", m_configLine.unitName) .add("Error", ex.getMessageValue()); m_processManager.logContext().log(log::ERR, "Failed to fork drive process. Initiating shutdown with SIGTERM."); // Wipe all previous states as we are shutting down @@ -255,7 +255,7 @@ void DriveHandler::kill() { m_sessionEndContext.pushOrReplace({"Error_sessionKilled", "1"}); m_sessionEndContext.pushOrReplace({"killSignal", WTERMSIG(status)}); m_sessionEndContext.pushOrReplace({"status", "failure"}); - m_sessionEndContext.pushOrReplace({"unitName",m_configLine.unitName}); + m_sessionEndContext.pushOrReplace({"tapeDrive",m_configLine.unitName}); m_sessionEndContext.log(cta::log::INFO, "Tape session finished"); m_sessionEndContext.clear(); m_pid=-1; @@ -273,7 +273,7 @@ void DriveHandler::kill() { //------------------------------------------------------------------------------ SubprocessHandler::ProcessingStatus DriveHandler::processEvent() { log::ScopedParamContainer params(m_processManager.logContext()); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); // Read from the socket pair try { serializers::WatchdogMessage message; @@ -374,7 +374,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::processStartingUp(serializers: // We expect to reach this state from pending fork. This is the first signal from the new process. // Check the transition is expected. This is non-fatal as the drive session has the last word anyway. log::ScopedParamContainer params(m_processManager.logContext()); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); if (m_sessionState!=SessionState::PendingFork || m_sessionType!=SessionType::Undetermined) { params.add("ExpectedState", session::toString(SessionState::PendingFork)) .add("ActualState", session::toString(m_sessionState)) @@ -403,7 +403,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::processScheduling(serializers: // We are either going to schedule // Check the transition is expected. This is non-fatal as the drive session has the last word anyway. log::ScopedParamContainer params(m_processManager.logContext()); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); std::set<SessionState> expectedStates = { SessionState::StartingUp, SessionState::Scheduling }; if (!expectedStates.count(m_sessionState) || m_sessionType != SessionType::Undetermined || @@ -439,7 +439,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::processChecking(serializers::W // We expect to come from statup/undefined and to get into checking/cleanup // As usual, subprocess has the last word. log::ScopedParamContainer params(m_processManager.logContext()); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); if (m_sessionState!=SessionState::StartingUp || m_sessionType!=SessionType::Undetermined|| (SessionType)message.sessiontype()!=SessionType::Cleanup) { params.add("PreviousState", session::toString(m_sessionState)) @@ -473,7 +473,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::processMounting(serializers::W // The only transition expected is from scheduling. Several sessions types are possible // As usual, subprocess has the last word. log::ScopedParamContainer params(m_processManager.logContext()); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); std::set<SessionType> expectedNewTypes= { SessionType::Archive, SessionType::Retrieve, SessionType::Label }; if (m_sessionState!=SessionState::Scheduling || m_sessionType!=SessionType::Undetermined|| @@ -490,7 +490,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::processMounting(serializers::W .add("PreviousType", session::toString(m_sessionType)) .add("NewState", session::toString((SessionState)message.sessionstate())) .add("NewType", session::toString((SessionType)message.sessiontype())) - .add("VID", message.vid()); + .add("tapeVid", message.vid()); m_processManager.logContext().log(log::DEBUG, "In DriveHandler::processMounting(): state change."); } @@ -511,7 +511,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::processRunning(serializers::Wa // We expect the type not to change (and to be in the right range) // As usual, subprocess has the last word. log::ScopedParamContainer params(m_processManager.logContext()); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); std::set<SessionState> expectedStates = { SessionState::Mounting, SessionState::Running }; std::set<SessionType> expectedTypes = { SessionType::Archive, SessionType::Retrieve, SessionType::Label }; if (!expectedStates.count(m_sessionState) || @@ -555,7 +555,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::processUnmounting(serializers: // of checking in the case of the cleanup session. // As usual, subprocess has the last word. log::ScopedParamContainer params(m_processManager.logContext()); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); std::set<std::tuple<SessionState, SessionType>> expectedStateTypes = { std::make_tuple( SessionState::Running, SessionType::Archive ), @@ -588,7 +588,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::processDrainingToDisk(serializ // This status transition is expected from unmounting, and only for retrieve sessions. // As usual, subprocess has the last word. log::ScopedParamContainer params(m_processManager.logContext()); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); if (SessionState::Unmounting != m_sessionState || SessionType::Retrieve != m_sessionType) { params.add("PreviousState", session::toString(m_sessionState)) @@ -614,7 +614,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::processShutingDown(serializers // This status transition is expected from unmounting, and only for retrieve sessions. // As usual, subprocess has the last word. log::ScopedParamContainer params(m_processManager.logContext()); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); std::set<SessionState> expectedStates = { SessionState::Unmounting, SessionState::DrainingToDisk }; if (!expectedStates.count(m_sessionState)) { params.add("PreviousState", session::toString(m_sessionState)) @@ -640,7 +640,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::processFatal(serializers::Watc // This status indicates that the session cannot be run and the server should // shut down (central storage unavailable). log::ScopedParamContainer params(m_processManager.logContext()); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); m_sessionState=(SessionState)message.sessionstate(); m_sessionType=(SessionType)message.sessiontype(); m_sessionVid=""; @@ -702,7 +702,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::processSigChild() { // be picked up) and -1 if the process is entirely gone. // Of course we might not have a child process to begin with. log::ScopedParamContainer params(m_processManager.logContext()); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); if (-1 == m_pid) return m_processingStatus; int processStatus; int rc=::waitpid(m_pid, &processStatus, WNOHANG); @@ -712,7 +712,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::processSigChild() { } catch (exception::Exception &ex) { cta::log::ScopedParamContainer params(m_processManager.logContext()); params.add("pid", m_pid) - .add("unitName", m_configLine.unitName) + .add("tapeDrive", m_configLine.unitName) .add("Message", ex.getMessageValue()) .add("SessionState", session::toString(m_sessionState)) .add("SessionType", toString(m_sessionType)); @@ -765,7 +765,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::processSigChild() { m_sessionEndContext.pushOrReplace({"status", "failure"}); } // In all cases we log the end of the session. - m_sessionEndContext.pushOrReplace({"unitName",m_configLine.unitName}); + m_sessionEndContext.pushOrReplace({"tapeDrive",m_configLine.unitName}); m_sessionEndContext.moveToTheEndIfPresent("status"); m_sessionEndContext.log(cta::log::INFO, "Tape session finished"); m_sessionEndContext.clear(); @@ -782,7 +782,7 @@ SubprocessHandler::ProcessingStatus DriveHandler::processTimeout() { // Process manager found that we timed out. Let's log why and kill the child process, // if any (there should be one). log::ScopedParamContainer params(m_processManager.logContext()); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); if (-1 == m_pid) { m_processManager.logContext().log(log::ERR, "In DriveHandler::processTimeout(): Received timeout without child process present."); m_processManager.logContext().log(log::INFO, "Re-launching child process."); @@ -941,7 +941,7 @@ int DriveHandler::runChild() { // 1) Special case first, if we crashed in a cleaner session, we put the drive down if (m_previousSession == PreviousSession::Crashed && m_previousType == SessionType::Cleanup) { log::ScopedParamContainer params(lc); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); lc.log(log::ERR, "In DriveHandler::runChild(): the cleaner session crashed. Putting the drive down."); // Get hold of the scheduler. try { @@ -991,8 +991,8 @@ int DriveHandler::runChild() { // Log the decision { log::ScopedParamContainer params(lc); - params.add("VID", m_previousVid) - .add("unitName", m_configLine.unitName) + params.add("tapeVid", m_previousVid) + .add("tapeDrive", m_configLine.unitName) .add("PreviousState", session::toString(m_sessionState)) .add("PreviousType", session::toString(m_sessionType)); lc.log(log::INFO, "In DriveHandler::runChild(): starting cleaner after crash with tape potentially loaded."); @@ -1060,7 +1060,7 @@ int DriveHandler::runChild() { if (m_previousSession == PreviousSession::Initiating) { // Log that we put the drive's desired state to down and do it. log::ScopedParamContainer params(lc); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); lc.log(log::INFO, "Setting the drive down at daemon startup"); try { // Before setting the desired state as down, we have to make sure the drive exists in the registry. @@ -1103,7 +1103,7 @@ int DriveHandler::runChild() { SubprocessHandler::ProcessingStatus DriveHandler::shutdown() { // TODO: improve in the future (preempt the child process) log::ScopedParamContainer params(m_processManager.logContext()); - params.add("unitName", m_configLine.unitName); + params.add("tapeDrive", m_configLine.unitName); m_processManager.logContext().log(log::INFO, "In DriveHandler::shutdown(): simply killing the process."); kill(); @@ -1114,8 +1114,8 @@ SubprocessHandler::ProcessingStatus DriveHandler::shutdown() { m_processManager.logContext().log(log::ERR, "In DriveHandler::shutdown(): Should run cleaner but VID is missing. Do not nothing."); } else { log::ScopedParamContainer params(m_processManager.logContext()); - params.add("VID", m_sessionVid) - .add("unitName", m_configLine.unitName) + params.add("tapeVid", m_sessionVid) + .add("tapeDrive", m_configLine.unitName) .add("sessionState", session::toString(m_sessionState)) .add("sessionType", session::toString(m_sessionType)); m_processManager.logContext().log(log::INFO, "In DriveHandler::shutdown(): starting cleaner."); diff --git a/tapeserver/daemon/TapedConfiguration.cpp b/tapeserver/daemon/TapedConfiguration.cpp index 2cec8ddeffcfeb0e8f759c79d064aea55df221cb..5aa08b906c0c36ec2fbdfdad499d238442cdd11d 100644 --- a/tapeserver/daemon/TapedConfiguration.cpp +++ b/tapeserver/daemon/TapedConfiguration.cpp @@ -29,7 +29,7 @@ namespace cta { template<> void SourcedParameter<tape::daemon::TpconfigLine>::addLogParamForValue(log::LogContext & lc) { lc.pushOrReplace({"category", "TPCONFIG Entry"}); - lc.pushOrReplace({"unitName", m_value.unitName}); + lc.pushOrReplace({"tapeDrive", m_value.unitName}); lc.pushOrReplace({"logicalLibrary", m_value.logicalLibrary}); lc.pushOrReplace({"devFilename", m_value.devFilename}); lc.pushOrReplace({"librarySlot", m_value.rawLibrarySlot});