diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 0b161e76970233b2b65c00f9e7b8c927ce916fa2..d2698f5cc9908c41cf40d583b8a9d9f0df410fe9 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -10,6 +10,7 @@ ### Bug Fixes - cta/CTA#485 - Check disk file metadata on delete requests - cta/CTA#634 - Fix crash of ctafrontend in initialisation for missing config values +- cta/CTA#645 - Fix new mount timeout log message - cta/CTA#666 - Fix drive status activity field not being properly reset - cta/CTA#502 - Fix string representation for Cleanup session type diff --git a/tapeserver/castor/tape/tapeserver/daemon/DataTransferSession.cpp b/tapeserver/castor/tape/tapeserver/daemon/DataTransferSession.cpp index 9b8557eb2907dbbfc98be36fa5f3d37cce906aaa..5b8205d105f29a274a7a50a03992cbfaed43530a 100644 --- a/tapeserver/castor/tape/tapeserver/daemon/DataTransferSession.cpp +++ b/tapeserver/castor/tape/tapeserver/daemon/DataTransferSession.cpp @@ -185,9 +185,12 @@ castor::tape::tapeserver::daemon::DataTransferSession::execute() { } } catch (cta::exception::TimeoutException &e) { // Print warning and try again, after refreshing the tape drive states + cta::log::ScopedParamContainer params(lc); + params.add("totalScheduleMountTime", std::to_string(t.secs())); lc.log(cta::log::WARNING, - "Timeout while getting new mount (" + std::to_string(m_dataTransferConfig.wdGetNextMountMaxSecs) + " seconds reached). " - "Total time trying to get new mount is " + std::to_string(t.secs()) + " seconds."); + "Timed out while scheduling new mount. Could not acquire global scheduler lock in " + std::to_string(m_dataTransferConfig.wdGetNextMountMaxSecs) + " seconds."); + + // We found a mount but got timedout while trying to acquire the global lock. nextMountTimeout = true; } catch (cta::exception::Exception &e) { lc.log(cta::log::ERR, "Error while scheduling new mount. Putting the drive down. Stack trace follows."); @@ -201,6 +204,8 @@ castor::tape::tapeserver::daemon::DataTransferSession::execute() { // Refresh the status to trigger the timeout update m_scheduler.reportDriveStatus(m_driveInfo, cta::common::dataStructures::MountType::NoMount, cta::common::dataStructures::DriveStatus::Up, lc); + + // Only sleep if we didn't found work to do. if (!nextMountTimeout) { lc.log(cta::log::DEBUG, "No new mount found. (sleeping " + std::to_string(m_dataTransferConfig.wdIdleSessionTimer) + " seconds)"); sleep(m_dataTransferConfig.wdIdleSessionTimer);