diff --git a/catalogue/Catalogue.hpp b/catalogue/Catalogue.hpp index a47dbfb7c9ce8838e8c119973b2682ef805d249f..50a57f44315f3bb38da3305f0080f72ede56214e 100644 --- a/catalogue/Catalogue.hpp +++ b/catalogue/Catalogue.hpp @@ -769,7 +769,6 @@ public: virtual void modifyMountPolicyRetrievePriority(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const uint64_t retrievePriority) = 0; virtual void modifyMountPolicyRetrieveMinRequestAge(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const uint64_t minRetrieveRequestAge) = 0; virtual void modifyMountPolicyMaxDrivesAllowed(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const uint64_t maxDrivesAllowed) = 0; - virtual void modifyMountPolicyMaxDrivesAllowedPerVo(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const uint64_t maxDrivesAllowedPerVo) = 0; virtual void modifyMountPolicyComment(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const std::string &comment) = 0; virtual void createActivitiesFairShareWeight(const common::dataStructures::SecurityIdentity &admin, const std::string & diskInstanceName, const std::string & acttivity, diff --git a/catalogue/CatalogueRetryWrapper.hpp b/catalogue/CatalogueRetryWrapper.hpp index 7e4a040261e969846039827d871f651bc0df7bca..95ee77155e7adf340a98c9fc2e2ca85331f9f68e 100644 --- a/catalogue/CatalogueRetryWrapper.hpp +++ b/catalogue/CatalogueRetryWrapper.hpp @@ -455,10 +455,6 @@ public: void modifyMountPolicyMaxDrivesAllowed(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const uint64_t maxDrivesAllowed) override { return retryOnLostConnection(m_log, [&]{return m_catalogue->modifyMountPolicyMaxDrivesAllowed(admin, name, maxDrivesAllowed);}, m_maxTriesToConnect); } - - void modifyMountPolicyMaxDrivesAllowedPerVo(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const uint64_t maxDrivesAllowedPerVo) override { - return retryOnLostConnection(m_log, [&]{return m_catalogue->modifyMountPolicyMaxDrivesAllowedPerVo(admin, name, maxDrivesAllowedPerVo);}, m_maxTriesToConnect); - } void modifyMountPolicyComment(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const std::string &comment) override { return retryOnLostConnection(m_log, [&]{return m_catalogue->modifyMountPolicyComment(admin, name, comment);}, m_maxTriesToConnect); diff --git a/catalogue/CatalogueTest.cpp b/catalogue/CatalogueTest.cpp index 05e4fdaf7ceed5385a71935a74a6220cab58131e..0e6ecc95d8319675cde231b496f2d4b653823832 100644 --- a/catalogue/CatalogueTest.cpp +++ b/catalogue/CatalogueTest.cpp @@ -6677,43 +6677,6 @@ TEST_P(cta_catalogue_CatalogueTest, modifyMountPolicyMaxDrivesAllowed_nonExisten ASSERT_THROW(m_catalogue->modifyMountPolicyMaxDrivesAllowed(m_admin, name, maxDrivesAllowed), exception::UserError); } -TEST_P(cta_catalogue_CatalogueTest, modifyMountPolicyMaxDrivesAllowedPerVo) { - using namespace cta; - - ASSERT_TRUE(m_catalogue->getMountPolicies().empty()); - - auto mountPolicyToAdd = getMountPolicy1(); - std::string mountPolicyName = mountPolicyToAdd.name; - m_catalogue->createMountPolicy(m_admin,mountPolicyToAdd); - - const uint64_t modifiedMaxDrivesAllowedPerVo = mountPolicyToAdd.maxDrivesAllowedPerVo + 10; - m_catalogue->modifyMountPolicyMaxDrivesAllowedPerVo(m_admin, mountPolicyName, modifiedMaxDrivesAllowedPerVo); - - { - const std::list<common::dataStructures::MountPolicy> mountPolicies = m_catalogue->getMountPolicies(); - ASSERT_EQ(1, mountPolicies.size()); - - const common::dataStructures::MountPolicy mountPolicy = mountPolicies.front(); - - ASSERT_EQ(modifiedMaxDrivesAllowedPerVo, mountPolicy.maxDrivesAllowedPerVo); - - const common::dataStructures::EntryLog modificationLog = mountPolicy.lastModificationLog; - ASSERT_EQ(m_admin.username, modificationLog.username); - ASSERT_EQ(m_admin.host, modificationLog.host); - } -} - -TEST_P(cta_catalogue_CatalogueTest, modifyMountPolicyMaxDrivesAllowedPerVo_nonExistentMountPolicy) { - using namespace cta; - - ASSERT_TRUE(m_catalogue->getMountPolicies().empty()); - - const std::string name = "mount_policy"; - const uint64_t maxDrivesAllowedPerVo = 2; - - ASSERT_THROW(m_catalogue->modifyMountPolicyMaxDrivesAllowedPerVo(m_admin, name, maxDrivesAllowedPerVo), exception::UserError); -} - TEST_P(cta_catalogue_CatalogueTest, modifyMountPolicyComment) { using namespace cta; diff --git a/catalogue/DummyCatalogue.hpp b/catalogue/DummyCatalogue.hpp index 1b9405ebc9e18260996d4e84dcc1210e950aff88..445e168b916d5a52c7af72e9fad4462fa3992cb4 100644 --- a/catalogue/DummyCatalogue.hpp +++ b/catalogue/DummyCatalogue.hpp @@ -117,7 +117,6 @@ public: void modifyMountPolicyArchivePriority(const common::dataStructures::SecurityIdentity& admin, const std::string& name, const uint64_t archivePriority) override { throw exception::Exception(std::string("In ")+__PRETTY_FUNCTION__+": not implemented"); } void modifyMountPolicyComment(const common::dataStructures::SecurityIdentity& admin, const std::string& name, const std::string& comment) override { throw exception::Exception(std::string("In ")+__PRETTY_FUNCTION__+": not implemented"); } void modifyMountPolicyMaxDrivesAllowed(const common::dataStructures::SecurityIdentity& admin, const std::string& name, const uint64_t maxDrivesAllowed) override { throw exception::Exception(std::string("In ")+__PRETTY_FUNCTION__+": not implemented"); } - void modifyMountPolicyMaxDrivesAllowedPerVo(const common::dataStructures::SecurityIdentity& admin, const std::string& name, const uint64_t maxDrivesAllowedPerVo) override { throw exception::Exception(std::string("In ")+__PRETTY_FUNCTION__+": not implemented"); } void modifyMountPolicyRetrieveMinRequestAge(const common::dataStructures::SecurityIdentity& admin, const std::string& name, const uint64_t minRetrieveRequestAge) override { throw exception::Exception(std::string("In ")+__PRETTY_FUNCTION__+": not implemented"); } void modifyMountPolicyRetrievePriority(const common::dataStructures::SecurityIdentity& admin, const std::string& name, const uint64_t retrievePriority) override { throw exception::Exception(std::string("In ")+__PRETTY_FUNCTION__+": not implemented"); } void modifyRequesteMountRuleComment(const common::dataStructures::SecurityIdentity& admin, const std::string& instanceName, const std::string& requesterName, const std::string& comment) override { throw exception::Exception(std::string("In ")+__PRETTY_FUNCTION__+": not implemented"); } diff --git a/catalogue/RdbmsCatalogue.cpp b/catalogue/RdbmsCatalogue.cpp index 0ffaaf40f3068e26ea84c826e5bdb2e4619f10fb..5fcc1af7500a47c73053e10e7cd7e039767724f4 100644 --- a/catalogue/RdbmsCatalogue.cpp +++ b/catalogue/RdbmsCatalogue.cpp @@ -5302,7 +5302,6 @@ optional<common::dataStructures::MountPolicy> RdbmsCatalogue::getRequesterGroupM "MOUNT_POLICY.RETRIEVE_MIN_REQUEST_AGE AS RETRIEVE_MIN_REQUEST_AGE," "MOUNT_POLICY.MAX_DRIVES_ALLOWED AS MAX_DRIVES_ALLOWED," - "MOUNT_POLICY.MAX_DRIVES_ALLOWED_PER_VO AS MAX_DRIVES_ALLOWED_PER_VO," "MOUNT_POLICY.USER_COMMENT AS USER_COMMENT," @@ -5338,7 +5337,6 @@ optional<common::dataStructures::MountPolicy> RdbmsCatalogue::getRequesterGroupM policy.retrieveMinRequestAge = rset.columnUint64("RETRIEVE_MIN_REQUEST_AGE"); policy.maxDrivesAllowed = rset.columnUint64("MAX_DRIVES_ALLOWED"); - policy.maxDrivesAllowedPerVo = rset.columnUint64("MAX_DRIVES_ALLOWED_PER_VO"); policy.comment = rset.columnString("USER_COMMENT"); policy.creationLog.username = rset.columnString("CREATION_LOG_USER_NAME"); @@ -5533,7 +5531,6 @@ optional<common::dataStructures::MountPolicy> RdbmsCatalogue::getRequesterMountP "MOUNT_POLICY.RETRIEVE_MIN_REQUEST_AGE AS RETRIEVE_MIN_REQUEST_AGE," "MOUNT_POLICY.MAX_DRIVES_ALLOWED AS MAX_DRIVES_ALLOWED," - "MOUNT_POLICY.MAX_DRIVES_ALLOWED_PER_VO AS MAX_DRIVES_ALLOWED_PER_VO," "MOUNT_POLICY.USER_COMMENT AS USER_COMMENT," @@ -5569,8 +5566,7 @@ optional<common::dataStructures::MountPolicy> RdbmsCatalogue::getRequesterMountP policy.retrieveMinRequestAge = rset.columnUint64("RETRIEVE_MIN_REQUEST_AGE"); policy.maxDrivesAllowed = rset.columnUint64("MAX_DRIVES_ALLOWED"); - policy.maxDrivesAllowedPerVo = rset.columnUint64("MAX_DRIVES_ALLOWED_PER_VO"); - + policy.comment = rset.columnString("USER_COMMENT"); policy.creationLog.username = rset.columnString("CREATION_LOG_USER_NAME"); @@ -5775,7 +5771,7 @@ void RdbmsCatalogue::modifyMountPolicyArchivePriority(const common::dataStructur stmt.executeNonQuery(); if(0 == stmt.getNbAffectedRows()) { - throw exception::UserError(std::string("Cannot modify mount policy ") + name + " because it does not exist"); + throw exception::UserError(std::string("Cannot modify mount policy ") + name + " because they do not exist"); } } catch(exception::UserError &) { throw; @@ -5814,7 +5810,7 @@ void RdbmsCatalogue::modifyMountPolicyArchiveMinRequestAge(const common::dataStr stmt.executeNonQuery(); if(0 == stmt.getNbAffectedRows()) { - throw exception::UserError(std::string("Cannot modify mount policy ") + name + " because it does not exist"); + throw exception::UserError(std::string("Cannot modify mount policy ") + name + " because they do not exist"); } } catch(exception::UserError &) { throw; @@ -5853,7 +5849,7 @@ void RdbmsCatalogue::modifyMountPolicyRetrievePriority(const common::dataStructu stmt.executeNonQuery(); if(0 == stmt.getNbAffectedRows()) { - throw exception::UserError(std::string("Cannot modify mount policy ") + name + " because it does not exist"); + throw exception::UserError(std::string("Cannot modify mount policy ") + name + " because they do not exist"); } } catch(exception::UserError &) { throw; @@ -5892,7 +5888,7 @@ void RdbmsCatalogue::modifyMountPolicyRetrieveMinRequestAge(const common::dataSt stmt.executeNonQuery(); if(0 == stmt.getNbAffectedRows()) { - throw exception::UserError(std::string("Cannot modify mount policy ") + name + " because it does not exist"); + throw exception::UserError(std::string("Cannot modify mount policy ") + name + " because they do not exist"); } } catch(exception::UserError &) { throw; @@ -5931,46 +5927,7 @@ void RdbmsCatalogue::modifyMountPolicyMaxDrivesAllowed(const common::dataStructu stmt.executeNonQuery(); if(0 == stmt.getNbAffectedRows()) { - throw exception::UserError(std::string("Cannot modify mount policy ") + name + " because it does not exist"); - } - } catch(exception::UserError &) { - throw; - } catch(exception::Exception &ex) { - ex.getMessage().str(std::string(__FUNCTION__) + ": " + ex.getMessage().str()); - throw; - } - - m_groupMountPolicyCache.invalidate(); - m_userMountPolicyCache.invalidate(); - m_allMountPoliciesCache.invalidate(); -} - -//------------------------------------------------------------------------------ -// modifyMountPolicyMaxDrivesAllowedPerVo -//------------------------------------------------------------------------------ -void RdbmsCatalogue::modifyMountPolicyMaxDrivesAllowedPerVo(const common::dataStructures::SecurityIdentity &admin, - const std::string &name, const uint64_t maxDrivesAllowedPerVo) { - try { - const time_t now = time(nullptr); - const char *const sql = - "UPDATE MOUNT_POLICY SET " - "MAX_DRIVES_ALLOWED_PER_VO = :MAX_DRIVES_ALLOWED_PER_VO," - "LAST_UPDATE_USER_NAME = :LAST_UPDATE_USER_NAME," - "LAST_UPDATE_HOST_NAME = :LAST_UPDATE_HOST_NAME," - "LAST_UPDATE_TIME = :LAST_UPDATE_TIME " - "WHERE " - "MOUNT_POLICY_NAME = :MOUNT_POLICY_NAME"; - auto conn = m_connPool.getConn(); - auto stmt = conn.createStmt(sql); - stmt.bindUint64(":MAX_DRIVES_ALLOWED_PER_VO", maxDrivesAllowedPerVo); - stmt.bindString(":LAST_UPDATE_USER_NAME", admin.username); - stmt.bindString(":LAST_UPDATE_HOST_NAME", admin.host); - stmt.bindUint64(":LAST_UPDATE_TIME", now); - stmt.bindString(":MOUNT_POLICY_NAME", name); - stmt.executeNonQuery(); - - if(0 == stmt.getNbAffectedRows()) { - throw exception::UserError(std::string("Cannot modify mount policy ") + name + " because it does not exist"); + throw exception::UserError(std::string("Cannot modify mount policy ") + name + " because they do not exist"); } } catch(exception::UserError &) { throw; @@ -5984,7 +5941,6 @@ void RdbmsCatalogue::modifyMountPolicyMaxDrivesAllowedPerVo(const common::dataSt m_allMountPoliciesCache.invalidate(); } - //------------------------------------------------------------------------------ // modifyMountPolicyComment //------------------------------------------------------------------------------ @@ -6010,7 +5966,7 @@ void RdbmsCatalogue::modifyMountPolicyComment(const common::dataStructures::Secu stmt.executeNonQuery(); if(0 == stmt.getNbAffectedRows()) { - throw exception::UserError(std::string("Cannot modify mount policy ") + name + " because it does not exist"); + throw exception::UserError(std::string("Cannot modify mount policy ") + name + " because they do not exist"); } } catch(exception::UserError &) { throw; @@ -7507,7 +7463,6 @@ RequesterAndGroupMountPolicies RdbmsCatalogue::getMountPolicies( "MOUNT_POLICY.RETRIEVE_PRIORITY AS RETRIEVE_PRIORITY," "MOUNT_POLICY.RETRIEVE_MIN_REQUEST_AGE AS RETRIEVE_MIN_REQUEST_AGE," "MOUNT_POLICY.MAX_DRIVES_ALLOWED AS MAX_DRIVES_ALLOWED," - "MOUNT_POLICY.MAX_DRIVES_ALLOWED_PER_VO AS MAX_DRIVES_ALLOWED_PER_VO," "MOUNT_POLICY.USER_COMMENT AS USER_COMMENT," "MOUNT_POLICY.CREATION_LOG_USER_NAME AS CREATION_LOG_USER_NAME," "MOUNT_POLICY.CREATION_LOG_HOST_NAME AS CREATION_LOG_HOST_NAME," @@ -7535,7 +7490,6 @@ RequesterAndGroupMountPolicies RdbmsCatalogue::getMountPolicies( "MOUNT_POLICY.RETRIEVE_PRIORITY AS RETRIEVE_PRIORITY," "MOUNT_POLICY.RETRIEVE_MIN_REQUEST_AGE AS RETRIEVE_MIN_REQUEST_AGE," "MOUNT_POLICY.MAX_DRIVES_ALLOWED AS MAX_DRIVES_ALLOWED," - "MOUNT_POLICY.MAX_DRIVES_ALLOWED_PER_VO AS MAX_DRIVES_ALLOWED_PER_VO," "MOUNT_POLICY.USER_COMMENT AS USER_COMMENT," "MOUNT_POLICY.CREATION_LOG_USER_NAME AS CREATION_LOG_USER_NAME," "MOUNT_POLICY.CREATION_LOG_HOST_NAME AS CREATION_LOG_HOST_NAME," @@ -7570,7 +7524,6 @@ RequesterAndGroupMountPolicies RdbmsCatalogue::getMountPolicies( policy.retrievePriority = rset.columnUint64("RETRIEVE_PRIORITY"); policy.retrieveMinRequestAge = rset.columnUint64("RETRIEVE_MIN_REQUEST_AGE"); policy.maxDrivesAllowed = rset.columnUint64("MAX_DRIVES_ALLOWED"); - policy.maxDrivesAllowedPerVo = rset.columnUint64("MAX_DRIVES_ALLOWED_PER_VO"); policy.comment = rset.columnString("USER_COMMENT"); policy.creationLog.username = rset.columnString("CREATION_LOG_USER_NAME"); policy.creationLog.host = rset.columnString("CREATION_LOG_HOST_NAME"); diff --git a/catalogue/RdbmsCatalogue.hpp b/catalogue/RdbmsCatalogue.hpp index e69f9e36382a6bf0024b7328c1009c75b1f269e7..5b7308c26709c6189cce8f638385a1930629e8f4 100644 --- a/catalogue/RdbmsCatalogue.hpp +++ b/catalogue/RdbmsCatalogue.hpp @@ -729,7 +729,6 @@ public: void modifyMountPolicyRetrievePriority(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const uint64_t retrievePriority) override; void modifyMountPolicyRetrieveMinRequestAge(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const uint64_t minRetrieveRequestAge) override; void modifyMountPolicyMaxDrivesAllowed(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const uint64_t maxDrivesAllowed) override; - void modifyMountPolicyMaxDrivesAllowedPerVo(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const uint64_t maxDrivesAllowedPerVo) override; void modifyMountPolicyComment(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const std::string &comment) override; void createActivitiesFairShareWeight(const common::dataStructures::SecurityIdentity &admin, const std::string & diskInstanceName, const std::string & activity, diff --git a/cmdline/CtaAdminCmdParse.hpp b/cmdline/CtaAdminCmdParse.hpp index cd8c39b5d83c0d5eb8f7412f645108af7f76cb3f..5107826bae19b337491bc0cc91dda9e5e49ffda2 100644 --- a/cmdline/CtaAdminCmdParse.hpp +++ b/cmdline/CtaAdminCmdParse.hpp @@ -278,7 +278,6 @@ const std::map<std::string, OptionUInt64::Key> uint64Options = { { "--copynb", OptionUInt64::COPY_NUMBER }, { "--id", OptionUInt64::ARCHIVE_FILE_ID }, { "--maxdrivesallowed", OptionUInt64::MAX_DRIVES_ALLOWED }, - { "--maxdrivesallowedpervo", OptionUInt64::MAX_DRIVES_ALLOWED_PER_VO }, { "--maxlpos", OptionUInt64::MAX_LPOS }, { "--minarchiverequestage", OptionUInt64::MIN_ARCHIVE_REQUEST_AGE }, { "--minlpos", OptionUInt64::MIN_LPOS }, @@ -438,7 +437,6 @@ const Option opt_logicallibrary { Option::OPT_STR, "--logicallibrary", const Option opt_logicallibrary_alias { Option::OPT_STR, "--name", "-n", " <logical_library_name>", "--logicallibrary" }; const Option opt_lookupns { Option::OPT_FLAG, "--lookupnamespace", "-l", "" }; const Option opt_maxdrivesallowed { Option::OPT_UINT, "--maxdrivesallowed", "-d", " <max_drives_allowed>" }; -const Option opt_maxdrivesallowedpervo { Option::OPT_UINT, "--maxdrivesallowedpervo", "-dvo", " <max_drives_allowed_per_vo>" }; const Option opt_maxlpos { Option::OPT_UINT, "--maxlpos", "-maxl", " <maximum_longitudinal_position>" }; const Option opt_mediatype { Option::OPT_STR, "--mediatype", "--mt", " <media_type_name>" }; const Option opt_mediatype_alias { Option::OPT_STR, "--name", "-n", " <media_type_name>", "--mediatype" }; @@ -529,10 +527,10 @@ const std::map<cmd_key_t, cmd_val_t> cmdOptions = { /*----------------------------------------------------------------------------------------------------*/ {{ AdminCmd::CMD_MOUNTPOLICY, AdminCmd::SUBCMD_ADD }, { opt_mountpolicy_alias, opt_archivepriority, opt_minarchiverequestage, opt_retrievepriority, - opt_minretrieverequestage, opt_maxdrivesallowed, opt_maxdrivesallowedpervo, opt_comment }}, + opt_minretrieverequestage, opt_maxdrivesallowed, opt_comment }}, {{ AdminCmd::CMD_MOUNTPOLICY, AdminCmd::SUBCMD_CH }, { opt_mountpolicy_alias, opt_archivepriority.optional(), opt_minarchiverequestage.optional(), - opt_retrievepriority.optional(), opt_minretrieverequestage.optional(), opt_maxdrivesallowed.optional(), opt_maxdrivesallowedpervo.optional(), + opt_retrievepriority.optional(), opt_minretrieverequestage.optional(), opt_maxdrivesallowed.optional(), opt_comment.optional() }}, {{ AdminCmd::CMD_MOUNTPOLICY, AdminCmd::SUBCMD_RM }, { opt_mountpolicy_alias }}, {{ AdminCmd::CMD_MOUNTPOLICY, AdminCmd::SUBCMD_LS }, { }}, diff --git a/cmdline/CtaAdminTextFormatter.cpp b/cmdline/CtaAdminTextFormatter.cpp index acc7fa94cc50a53eaaaa2556b3eeeec09c331ecd..e0eec7d3a047136eccf03dfba0048c1c191fbf4f 100644 --- a/cmdline/CtaAdminTextFormatter.cpp +++ b/cmdline/CtaAdminTextFormatter.cpp @@ -581,7 +581,6 @@ void TextFormatter::printMountPolicyLsHeader() { "r.priority", "r.minAge", "max drives", - "max drives per vo", "c.user", "c.host", "c.time", @@ -600,7 +599,6 @@ void TextFormatter::print(const MountPolicyLsItem &mpls_item) { mpls_item.retrieve_priority(), mpls_item.retrieve_min_request_age(), mpls_item.max_drives_allowed(), - mpls_item.max_drives_allowed_per_vo(), mpls_item.creation_log().username(), mpls_item.creation_log().host(), timeToStr(mpls_item.creation_log().time()), diff --git a/continuousintegration/orchestration/tests/prepare_tests.sh b/continuousintegration/orchestration/tests/prepare_tests.sh index e815c422e1817e93b723fbaa97d5b48b843ffdd1..2ad8baae4293371f466c92939d308dc42bfd4976 100755 --- a/continuousintegration/orchestration/tests/prepare_tests.sh +++ b/continuousintegration/orchestration/tests/prepare_tests.sh @@ -182,7 +182,6 @@ kubectl --namespace ${NAMESPACE} exec ctacli -- cta-admin --json version | jq --retrievepriority 1 \ --minretrieverequestage 1 \ --maxdrivesallowed 1 \ - --maxdrivesallowedpervo 1 \ --comment "ctasystest" kubectl --namespace ${NAMESPACE} exec ctacli -- cta-admin requestermountrule add \ --instance ${EOSINSTANCE} \ diff --git a/continuousintegration/orchestration/tests/repack_systemtest_wrapper.sh b/continuousintegration/orchestration/tests/repack_systemtest_wrapper.sh index 1948497bb688c18a953555eb72c53f720c2c02ef..90c50cbcf535c83845881e0db7775c4241dacfe2 100755 --- a/continuousintegration/orchestration/tests/repack_systemtest_wrapper.sh +++ b/continuousintegration/orchestration/tests/repack_systemtest_wrapper.sh @@ -122,9 +122,6 @@ repackDisableTape() { echo "Reclaiming tape ${VID_TO_REPACK}" kubectl -n ${NAMESPACE} exec ctacli -- cta-admin tape reclaim --vid ${VID_TO_REPACK} - echo "Changing the state of tape ${VID_TO_REPACK} to ACTIVE" - kubectl -n ${NAMESPACE} exec ctacli -- cta-admin tape ch --vid ${VID_TO_REPACK} --state ACTIVE - echo echo "*************************************************************" echo "STEP $1. Launching a Repack Request on a disabled tape TEST OK" diff --git a/xroot_plugins/XrdCtaMountPolicyLs.hpp b/xroot_plugins/XrdCtaMountPolicyLs.hpp index 94bee7b1eac58e3406508dbe0feb8f8699a40486..084bad6086ac3926fdf0cd67e6059a3f82c579f9 100644 --- a/xroot_plugins/XrdCtaMountPolicyLs.hpp +++ b/xroot_plugins/XrdCtaMountPolicyLs.hpp @@ -79,7 +79,6 @@ int MountPolicyLsStream::fillBuffer(XrdSsiPb::OStreamBuffer<Data> *streambuf) { mp_item->set_retrieve_priority(mp.retrievePriority); mp_item->set_retrieve_min_request_age(mp.retrieveMinRequestAge); mp_item->set_max_drives_allowed(mp.maxDrivesAllowed); - mp_item->set_max_drives_allowed_per_vo(mp.maxDrivesAllowedPerVo); mp_item->mutable_creation_log()->set_username(mp.creationLog.username); mp_item->mutable_creation_log()->set_host(mp.creationLog.host); mp_item->mutable_creation_log()->set_time(mp.creationLog.time); diff --git a/xroot_plugins/XrdSsiCtaRequestMessage.cpp b/xroot_plugins/XrdSsiCtaRequestMessage.cpp index ca22f5448060477894ab660fb24e8a45345056e1..d1070a5b04be854a5081a1648cfbb029f566ee87 100644 --- a/xroot_plugins/XrdSsiCtaRequestMessage.cpp +++ b/xroot_plugins/XrdSsiCtaRequestMessage.cpp @@ -1391,7 +1391,6 @@ void RequestMessage::processMountPolicy_Add(cta::xrd::Response &response) auto &retrievepriority = getRequired(OptionUInt64::RETRIEVE_PRIORITY); auto &minretrieverequestage = getRequired(OptionUInt64::MIN_RETRIEVE_REQUEST_AGE); auto &maxdrivesallowed = getRequired(OptionUInt64::MAX_DRIVES_ALLOWED); - auto &maxdrivesallowedpervo = getRequired(OptionUInt64::MAX_DRIVES_ALLOWED_PER_VO); auto &comment = getRequired(OptionString::COMMENT); cta::catalogue::CreateMountPolicyAttributes mountPolicy; @@ -1401,7 +1400,8 @@ void RequestMessage::processMountPolicy_Add(cta::xrd::Response &response) mountPolicy.retrievePriority = retrievepriority; mountPolicy.minRetrieveRequestAge = minretrieverequestage; mountPolicy.maxDrivesAllowed = maxdrivesallowed; - mountPolicy.maxDrivesAllowedPerVo = maxdrivesallowedpervo; + //TODO: Add the OptionUint64::MAX_DRIVES_ALLOWED_PER_VO + mountPolicy.maxDrivesAllowedPerVo = maxdrivesallowed; mountPolicy.comment = comment; m_catalogue.createMountPolicy(m_cliIdentity, mountPolicy); @@ -1421,7 +1421,6 @@ void RequestMessage::processMountPolicy_Ch(cta::xrd::Response &response) auto retrievepriority = getOptional(OptionUInt64::RETRIEVE_PRIORITY); auto minretrieverequestage = getOptional(OptionUInt64::MIN_RETRIEVE_REQUEST_AGE); auto maxdrivesallowed = getOptional(OptionUInt64::MAX_DRIVES_ALLOWED); - auto maxdrivesallowedpervo = getOptional(OptionUInt64::MAX_DRIVES_ALLOWED_PER_VO); auto comment = getOptional(OptionString::COMMENT); if(archivepriority) { @@ -1439,9 +1438,6 @@ void RequestMessage::processMountPolicy_Ch(cta::xrd::Response &response) if(maxdrivesallowed) { m_catalogue.modifyMountPolicyMaxDrivesAllowed(m_cliIdentity, group, maxdrivesallowed.value()); } - if(maxdrivesallowedpervo){ - m_catalogue.modifyMountPolicyMaxDrivesAllowedPerVo(m_cliIdentity, group, maxdrivesallowedpervo.value()); - } if(comment) { m_catalogue.modifyMountPolicyComment(m_cliIdentity, group, comment.value()); } diff --git a/xrootd-ssi-protobuf-interface b/xrootd-ssi-protobuf-interface index 52f53bdf8f6f08f4344c8e28cc098c471cda31af..668b482304a1fc3037e99ad41a40517f0638a018 160000 --- a/xrootd-ssi-protobuf-interface +++ b/xrootd-ssi-protobuf-interface @@ -1 +1 @@ -Subproject commit 52f53bdf8f6f08f4344c8e28cc098c471cda31af +Subproject commit 668b482304a1fc3037e99ad41a40517f0638a018