Commit 54b1e56a authored by Steven Murray's avatar Steven Murray
Browse files

Changed the sys.workflow.sync::openw.default event to sys.workflow.sync::create.default

parent 1de22c45
......@@ -8,7 +8,7 @@ eos attr set sys.acl=g:eosusers:rwx!d,u:poweruser1:rwx+dp,u:poweruser2:rwx+dp ${
eos attr set CTA_StorageClass=ctaStorageClass ${PREPROD_DIR}
eos attr set CTA_TapeFsId=65535 ${PREPROD_DIR}
eos attr set sys.workflow.sync::openw.default="proto:ctafrontend:10955 ctafrontend" ${PREPROD_DIR}
eos attr set sys.workflow.sync::create.default="proto:ctafrontend:10955 ctafrontend" ${PREPROD_DIR}
eos attr set sys.workflow.closew.default="proto:ctafrontend:10955 ctafrontend" ${PREPROD_DIR}
eos attr set sys.workflow.archived.default="proto:ctafrontend:10955 ctafrontend" ${PREPROD_DIR}
eos attr set sys.workflow.sync::prepare.default="proto:ctafrontend:10955 ctafrontend" ${PREPROD_DIR}
......
......@@ -308,7 +308,7 @@ CTA_ENDPOINT=ctafrontend:10955
echo "Setting workflows in namespace ${instance} pod ctaeos:"
CTA_WF_DIR=/eos/${EOSINSTANCE}/proc/cta/workflow
for WORKFLOW in sync::openw.default closew.default archived.default sync::prepare.default sync::delete.default
for WORKFLOW in sync::create.default closew.default archived.default sync::prepare.default sync::delete.default
do
echo "eos attr set sys.workflow.${WORKFLOW}=\"proto:${CTA_ENDPOINT} ctafrontend\" ${CTA_WF_DIR}"
kubectl --namespace=${instance} exec ctaeos -- bash -c "eos attr set sys.workflow.${WORKFLOW}=\"proto:${CTA_ENDPOINT} ctafrontend\" ${CTA_WF_DIR}"
......
......@@ -326,6 +326,18 @@ void RequestMessage::process(const cta::xrd::Request &request, cta::xrd::Respons
// EOS Workflow commands
void RequestMessage::processOPENW(const cta::eos::Notification &notification, cta::xrd::Response &response)
{
// Create a log entry
cta::log::ScopedParamContainer params(m_lc);
m_lc.log(cta::log::INFO, "In processOPENW(): ignoring OPENW event.");
// Set response type
response.set_type(cta::xrd::Response::RSP_SUCCESS);
}
void RequestMessage::processCREATE(const cta::eos::Notification &notification, cta::xrd::Response &response)
{
// Unpack message
......@@ -346,7 +358,7 @@ void RequestMessage::processOPENW(const cta::eos::Notification &notification, ct
cta::log::ScopedParamContainer params(m_lc);
params.add("fileId", archiveFileId).add("catalogueTime", t.secs());
m_lc.log(cta::log::INFO, "In processOPENW(): getting new archive file ID.");
m_lc.log(cta::log::INFO, "In processCREATE(): getting new archive file ID.");
response.mutable_xattr()->insert(google::protobuf::MapPair<std::string,std::string>("CTA_ArchiveFileId", std::to_string(archiveFileId)));
......@@ -355,18 +367,6 @@ void RequestMessage::processOPENW(const cta::eos::Notification &notification, ct
response.set_type(cta::xrd::Response::RSP_SUCCESS);
}
void RequestMessage::processCREATE(const cta::eos::Notification &notification, cta::xrd::Response &response)
{
// Create a log entry
cta::log::ScopedParamContainer params(m_lc);
m_lc.log(cta::log::INFO, "In processCREATE(): ignoring CREATE event.");
// Set response type
response.set_type(cta::xrd::Response::RSP_SUCCESS);
}
void RequestMessage::processCLOSEW(const cta::eos::Notification &notification, cta::xrd::Response &response)
{
// Unpack message
......
......@@ -64,7 +64,7 @@ private:
typedef void notification_event_t(const cta::eos::Notification &notification, cta::xrd::Response &response);
notification_event_t processOPENW; //!< Ignore OPENW event
notification_event_t processCREATE; //!< Ignore CREATE event
notification_event_t processCREATE; //!< New archive file ID event
notification_event_t processCLOSEW; //!< Archive file event
notification_event_t processPREPARE; //!< Retrieve file event
notification_event_t processDELETE; //!< Delete file event
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment