diff --git a/cmdline/EosCtaStub.cpp b/cmdline/EosCtaStub.cpp index 19b79091112e86d8ffd9a9f8fab79a09d161b7b5..253286d56c9a9789185ea01714a2dfe258bdc683 100644 --- a/cmdline/EosCtaStub.cpp +++ b/cmdline/EosCtaStub.cpp @@ -239,11 +239,11 @@ void fillNotification(cta::eos::Notification ¬ification, int argc, const char } else if(argstr == "--diskfilepath") notification.mutable_file()->set_lpath(argval); else if(argstr == "--storageclass") { - google::protobuf::MapPair<std::string,std::string> sc("CTA_StorageClass", argval); + google::protobuf::MapPair<std::string,std::string> sc("sys.archive.storage_class", argval); notification.mutable_file()->mutable_xattr()->insert(sc); } else if(argstr == "--id") { - google::protobuf::MapPair<std::string,std::string> id("CTA_ArchiveFileId", argval); + google::protobuf::MapPair<std::string,std::string> id("sys.archive.file_id", argval); notification.mutable_file()->mutable_xattr()->insert(id); } else throw std::runtime_error("Unrecognised key " + argstr); diff --git a/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/ctaeos-mgm.sh b/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/ctaeos-mgm.sh index 789c31cde9904b3205350db3f7699cf9cf554863..e5f251d6fe85ac3fec1088b38d0ac8df6525bf33 100755 --- a/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/ctaeos-mgm.sh +++ b/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/ctaeos-mgm.sh @@ -264,7 +264,7 @@ fi eos mkdir ${CTA_TEST_DIR} eos chmod 555 ${CTA_TEST_DIR} eos attr set sys.acl=g:eosusers:rwx!d,u:poweruser1:rwx+dp,u:poweruser2:rwx+dp /eos/ctaeos/cta - eos attr set CTA_StorageClass=ctaStorageClass ${CTA_TEST_DIR} + eos attr set sys.archive.storage_class=ctaStorageClass ${CTA_TEST_DIR} # Link the attributes of CTA worklow directory to the test directory eos attr link ${CTA_WF_DIR} ${CTA_TEST_DIR} diff --git a/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/eos_configure_preprod.sh b/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/eos_configure_preprod.sh index d784ef2981300dc4756dbad0edcdf9e9e7fdfdc5..1727bcf4e047d86617f6846d0445a14db8c7e0f5 100755 --- a/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/eos_configure_preprod.sh +++ b/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/eos_configure_preprod.sh @@ -5,7 +5,7 @@ eos mkdir ${PREPROD_DIR} eos chmod 555 ${PREPROD_DIR} eos attr set sys.acl=g:eosusers:rwx!d,u:poweruser1:rwx+dp,u:poweruser2:rwx+dp ${PREPROD_DIR} -eos attr set CTA_StorageClass=ctaStorageClass ${PREPROD_DIR} +eos attr set sys.archive.storage_class=ctaStorageClass ${PREPROD_DIR} eos attr set sys.workflow.sync::create.default="proto" ${PREPROD_DIR} eos attr set sys.workflow.sync::closew.default="proto" ${PREPROD_DIR} diff --git a/xroot_plugins/XrdSsiCtaRequestMessage.cpp b/xroot_plugins/XrdSsiCtaRequestMessage.cpp index a6627fe0bb8bc7a98c3990b6204864d5d479568f..bc300a336f88ee42e48a1d1c0e0e381d624d0d49 100644 --- a/xroot_plugins/XrdSsiCtaRequestMessage.cpp +++ b/xroot_plugins/XrdSsiCtaRequestMessage.cpp @@ -331,13 +331,13 @@ void RequestMessage::processCREATE(const cta::eos::Notification ¬ification, c requester.name = notification.cli().user().username(); requester.group = notification.cli().user().groupname(); - const auto storageClassItor = notification.file().xattr().find("CTA_StorageClass"); + const auto storageClassItor = notification.file().xattr().find("sys.archive_storage_class"); if(notification.file().xattr().end() == storageClassItor) { - throw PbException(std::string(__FUNCTION__) + ": CTA_StorageClass extended attribute is not set"); + throw PbException(std::string(__FUNCTION__) + ": sys.archive_storage_class extended attribute is not set"); } const std::string storageClass = storageClassItor->second; if(storageClass.empty()) { - throw PbException(std::string(__FUNCTION__) + ": CTA_StorageClass extended attribute is set to an empty string"); + throw PbException(std::string(__FUNCTION__) + ": sys.archive_storage_class extended attribute is set to an empty string"); } cta::utils::Timer t; @@ -353,10 +353,10 @@ void RequestMessage::processCREATE(const cta::eos::Notification ¬ification, c m_lc.log(cta::log::INFO, "In RequestMessage::processCREATE(): assigning new archive file ID."); // Set ArchiveFileId in xattrs - response.mutable_xattr()->insert(google::protobuf::MapPair<std::string,std::string>("CTA_ArchiveFileId", std::to_string(archiveFileId))); + response.mutable_xattr()->insert(google::protobuf::MapPair<std::string,std::string>("sys.archive.file_id", std::to_string(archiveFileId))); // Set the storage class in xattrs - response.mutable_xattr()->insert(google::protobuf::MapPair<std::string,std::string>("CTA_StorageClass", storageClass)); + response.mutable_xattr()->insert(google::protobuf::MapPair<std::string,std::string>("sys.archive_storage_class", storageClass)); // Set response type response.set_type(cta::xrd::Response::RSP_SUCCESS); @@ -374,9 +374,9 @@ void RequestMessage::processCLOSEW(const cta::eos::Notification ¬ification, c checkIsNotEmptyString(notification.transport().report_url(), "notification.transport.report_url"); // Unpack message - const auto storageClassItor = notification.file().xattr().find("CTA_StorageClass"); + const auto storageClassItor = notification.file().xattr().find("sys.archive_storage_class"); if(notification.file().xattr().end() == storageClassItor) { - throw PbException(std::string(__FUNCTION__) + ": Failed to find the extended attribute named CTA_StorageClass"); + throw PbException(std::string(__FUNCTION__) + ": Failed to find the extended attribute named sys.archive_storage_class"); } cta::common::dataStructures::ArchiveRequest request; @@ -399,9 +399,9 @@ void RequestMessage::processCLOSEW(const cta::eos::Notification ¬ification, c // CTA Archive ID is an EOS extended attribute, i.e. it is stored as a string, which // must be converted to a valid uint64_t - const auto archiveFileIdItor = notification.file().xattr().find("CTA_ArchiveFileId"); + const auto archiveFileIdItor = notification.file().xattr().find("sys.archive.file_id"); if(notification.file().xattr().end() == archiveFileIdItor) { - throw PbException(std::string(__FUNCTION__) + ": Failed to find the extended attribute named CTA_ArchiveFileId"); + throw PbException(std::string(__FUNCTION__) + ": Failed to find the extended attribute named sys.archive.file_id"); } const std::string archiveFileIdStr = archiveFileIdItor->second; uint64_t archiveFileId = 0; @@ -449,9 +449,9 @@ void RequestMessage::processPREPARE(const cta::eos::Notification ¬ification, // CTA Archive ID is an EOS extended attribute, i.e. it is stored as a string, which must be // converted to a valid uint64_t - const auto archiveFileIdItor = notification.file().xattr().find("CTA_ArchiveFileId"); + const auto archiveFileIdItor = notification.file().xattr().find("sys.archive.file_id"); if(notification.file().xattr().end() == archiveFileIdItor) { - throw PbException(std::string(__FUNCTION__) + ": Failed to find the extended attribute named CTA_ArchiveFileId"); + throw PbException(std::string(__FUNCTION__) + ": Failed to find the extended attribute named sys.archive.file_id"); } const std::string archiveFileIdStr = archiveFileIdItor->second; if((request.archiveFileID = strtoul(archiveFileIdStr.c_str(), nullptr, 10)) == 0) @@ -498,9 +498,9 @@ void RequestMessage::processABORT_PREPARE(const cta::eos::Notification ¬ifica // CTA Archive ID is an EOS extended attribute, i.e. it is stored as a string, which must be // converted to a valid uint64_t - const auto archiveFileIdItor = notification.file().xattr().find("CTA_ArchiveFileId"); + const auto archiveFileIdItor = notification.file().xattr().find("sys.archive.file_id"); if(notification.file().xattr().end() == archiveFileIdItor) { - throw PbException(std::string(__FUNCTION__) + ": Failed to find the extended attribute named CTA_ArchiveFileId"); + throw PbException(std::string(__FUNCTION__) + ": Failed to find the extended attribute named sys.archive.file_id"); } const std::string archiveFileIdStr = archiveFileIdItor->second; if((request.archiveFileID = strtoul(archiveFileIdStr.c_str(), nullptr, 10)) == 0) @@ -550,9 +550,9 @@ void RequestMessage::processDELETE(const cta::eos::Notification ¬ification, c // CTA Archive ID is an EOS extended attribute, i.e. it is stored as a string, which // must be converted to a valid uint64_t - const auto archiveFileIdItor = notification.file().xattr().find("CTA_ArchiveFileId"); + const auto archiveFileIdItor = notification.file().xattr().find("sys.archive.file_id"); if(notification.file().xattr().end() == archiveFileIdItor) { - throw PbException(std::string(__FUNCTION__) + ": Failed to find the extended attribute named CTA_ArchiveFileId"); + throw PbException(std::string(__FUNCTION__) + ": Failed to find the extended attribute named sys.archive.file_id"); } const std::string archiveFileIdStr = archiveFileIdItor->second; if((request.archiveFileID = strtoul(archiveFileIdStr.c_str(), nullptr, 10)) == 0)