From 6a3eb7dcc01810a315607518126223a1247ad628 Mon Sep 17 00:00:00 2001
From: Cedric Caffy <cedric.caffy@cern.ch>
Date: Tue, 13 Oct 2020 10:03:24 +0200
Subject: [PATCH] [RAO] If the drive limits UDS could not be queried, the RAO
 is not disabled anymore. A CTA RAO is triggered.

---
 .../castor/tape/tapeserver/daemon/RecallTaskInjector.cpp      | 3 +--
 tapeserver/castor/tape/tapeserver/drive/DriveGeneric.cpp      | 4 ----
 tapeserver/castor/tape/tapeserver/drive/DriveGeneric.hpp      | 1 -
 3 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/tapeserver/castor/tape/tapeserver/daemon/RecallTaskInjector.cpp b/tapeserver/castor/tape/tapeserver/daemon/RecallTaskInjector.cpp
index 992a06ca65..737e300995 100644
--- a/tapeserver/castor/tape/tapeserver/daemon/RecallTaskInjector.cpp
+++ b/tapeserver/castor/tape/tapeserver/daemon/RecallTaskInjector.cpp
@@ -274,10 +274,9 @@ void RecallTaskInjector::WorkerThread::run()
       LogContext::ScopedParam sp(m_parent.m_lc, Param("maxSupportedUDS", m_parent.m_raoManager.getMaxFilesSupported().value()));
       m_parent.m_lc.log(cta::log::INFO,"Query getLimitUDS for RAO Enterprise completed");
     } catch (castor::tape::SCSI::Exception& e) {
-      m_parent.m_raoManager.disableRAO();
       cta::log::ScopedParamContainer spc(m_parent.m_lc);
       spc.add("exceptionMessage",e.getMessageValue());
-      m_parent.m_lc.log(cta::log::ERR, "Error while fetching the limitUDS for RAO enterprise drive.");
+      m_parent.m_lc.log(cta::log::ERR, "Error while fetching the limitUDS for RAO enterprise drive. Will run a CTA RAO.");
     } catch(const castor::tape::tapeserver::drive::DriveDoesNotSupportRAOException &ex){
       m_parent.m_lc.log(cta::log::INFO, "The drive does not support RAO Enterprise, will run a CTA RAO.");
     }
diff --git a/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.cpp b/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.cpp
index 41bb4018e4..973e618405 100644
--- a/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.cpp
+++ b/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.cpp
@@ -118,10 +118,6 @@ void drive::DriveLTO::clearCompressionStats() {
   SCSI::ExceptionLauncher(sgh, "SCSI error in clearCompressionStats:");
 }
 
-SCSI::Structures::RAO::udsLimits drive::DriveLTO::getLimitUDS() {
-  throw castor::tape::tapeserver::drive::DriveDoesNotSupportRAOException("Drive does not support RAO enterprise.");
-}
-
 /**
  * Information about the drive. The vendor id is used in the user labels of the files.
  * @return    The deviceInfo structure with the information about the drive.
diff --git a/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.hpp b/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.hpp
index fef9ab0672..aca50c509e 100644
--- a/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.hpp
+++ b/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.hpp
@@ -595,7 +595,6 @@ namespace drive {
     virtual compressionStats getCompression();
     virtual void clearCompressionStats();
     virtual std::vector<castor::tape::tapeserver::drive::endOfWrapPosition> getEndOfWrapPositions();
-    virtual SCSI::Structures::RAO::udsLimits getLimitUDS();
   };
 
   class DriveIBM3592 : public DriveGeneric {
-- 
GitLab