diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 65d578b3d16296a80b9d9d5c5fe306508e29b8bd..76d35ffc34010f5e5853be6b7b6210c76ae3319d 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -4,7 +4,9 @@ ### Features +- Upgraded EOS to 4.8.35-1 - cta/CTA#954 The drive is put down if the CleanerSession fails to eject the tape from it after a shutdown +- cta/CTA#945 The timeout for tape load action is now configurable ### Bug fixes diff --git a/cta.spec.in b/cta.spec.in index 34eed5927c7f8e2574f3bb9ead1106d9b0d10399..4bd787b0356da56702d28cec578aaf582442eb8f 100644 --- a/cta.spec.in +++ b/cta.spec.in @@ -492,7 +492,9 @@ Currently contains a helper for the client-ar script, which should be installed %changelog * Thu Jan 07 2021 julien.leduc (at) cern.ch - 3.1-14 +- Upgraded EOS to 4.8.35-1 - cta/CTA#954 The drive is put down if the CleanerSession fails to eject the tape from it after a shutdown +- cta/CTA#945 The timeout for tape load action is now configurable - cta/CTA#957 The state of the successful Archive for repack jobs is now changed before being queued for reporting - cta/CTA#958 The RepackRequest garbage collection now changes the owner of the garbage collected RepackRequest. * Thu Jan 07 2021 julien.leduc (at) cern.ch - 3.1-13 diff --git a/tapeserver/castor/tape/tapeserver/daemon/TapeReadSingleThread.cpp b/tapeserver/castor/tape/tapeserver/daemon/TapeReadSingleThread.cpp index f4d87a385315c73ce8d8d0841003da66dbd2d14e..e964579a42352ffeeb2eea629d35e496bb38ea4b 100644 --- a/tapeserver/castor/tape/tapeserver/daemon/TapeReadSingleThread.cpp +++ b/tapeserver/castor/tape/tapeserver/daemon/TapeReadSingleThread.cpp @@ -253,13 +253,16 @@ void castor::tape::tapeserver::daemon::TapeReadSingleThread::run() { m_logContext.log(cta::log::INFO, "Tape session started"); mountTapeReadOnly(); currentErrorToCount = "Error_tapeLoad"; + cta::utils::Timer tapeLoadTimer; waitForDrive(); + double tapeLoadTime = tapeLoadTimer.secs(); currentErrorToCount = "Error_checkingTapeAlert"; logTapeAlerts(); m_stats.mountTime += timer.secs(cta::utils::Timer::resetCounter); { cta::log::ScopedParamContainer scoped(m_logContext); scoped.add("mountTime", m_stats.mountTime); + scoped.add("tapeLoadTime",tapeLoadTime); m_logContext.log(cta::log::INFO, "Tape mounted and drive ready"); } m_retrieveMount.setTapeMounted(m_logContext); diff --git a/tapeserver/castor/tape/tapeserver/daemon/TapeSingleThreadInterface.hpp b/tapeserver/castor/tape/tapeserver/daemon/TapeSingleThreadInterface.hpp index 4cb73032f8fdf64dcabfe112079380dd951fa72b..5efa283b097a3422cf96a2ebe084ca5f2d0c0ffc 100644 --- a/tapeserver/castor/tape/tapeserver/daemon/TapeSingleThreadInterface.hpp +++ b/tapeserver/castor/tape/tapeserver/daemon/TapeSingleThreadInterface.hpp @@ -151,14 +151,16 @@ protected: * case of timeout) */ void waitForDrive(){ + cta::utils::Timer tapeLoadTime; try{ - cta::utils::Timer timer; // wait tapeLoadTimeout seconds for drive to be ready (the mount call is synchronous, so this just the load operation. m_drive.waitUntilReady(m_tapeLoadTimeout); - cta::log::LogContext::ScopedParam sp0(m_logContext, cta::log::Param("loadTime", timer.secs())); }catch(const cta::exception::Exception& e){ - cta::log::LogContext::ScopedParam sp01(m_logContext, cta::log::Param("exceptionMessage", e.getMessageValue())); - m_logContext.log(cta::log::INFO, "Got timeout or error while waiting for drive to be ready."); + cta::log::ScopedParamContainer spc(m_logContext); + spc.add("exceptionMessage",e.getMessageValue()) + .add("configuredTapeLoadTimeout",m_tapeLoadTimeout) + .add("tapeLoadTime",tapeLoadTime.secs()); + m_logContext.log(cta::log::ERR, "Got timeout or error while waiting for drive to be ready."); throw; } } diff --git a/tapeserver/castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp b/tapeserver/castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp index f4cf3489b9d5d44dfbeb3e06c6d8d4850bfa5320..fea50ba212125b31b30e8ba2590d65b420418bd4 100644 --- a/tapeserver/castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp +++ b/tapeserver/castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp @@ -327,7 +327,9 @@ void castor::tape::tapeserver::daemon::TapeWriteSingleThread::run() { m_logContext.log(cta::log::INFO, "Tape session started"); mountTapeReadWrite(); currentErrorToCount = "Error_tapeLoad"; + cta::utils::Timer tapeLoadTimer; waitForDrive(); + double tapeLoadTime = tapeLoadTimer.secs(); currentErrorToCount = "Error_checkingTapeAlert"; if(logAndCheckTapeAlertsForWrite()) { throw cta::exception::Exception("Aborting migration session in" @@ -341,6 +343,7 @@ void castor::tape::tapeserver::daemon::TapeWriteSingleThread::run() { { cta::log::ScopedParamContainer scoped(m_logContext); scoped.add("mountTime", m_stats.mountTime); + scoped.add("tapeLoadTime",tapeLoadTime); m_logContext.log(cta::log::INFO, "Tape mounted and drive ready"); } m_archiveMount.setTapeMounted(m_logContext);