Commit 41bdbff5 authored by Jozsef Makai's avatar Jozsef Makai

MGM,DOC: removed sync::openw event

parent 19f57f3b
......@@ -16,7 +16,6 @@ The workflow engine allows to create chained workflows e.g. one workflow can tri
Event Description
=================== ==================================================================================================
sync::create event is triggered at the MGM when a file is being created (synchronous event)
sync::openw event is triggered at the MGM when a 'file open for write' (synchronous event)
open event is triggered at the MGM when a 'file open'
- if the return of an open call is ENONET a workflow defined stall time is returned
sync::prepare event is triggered at the MGM when a 'prepare' is issued (synchronous event)
......
......@@ -1823,22 +1823,6 @@ WFE::Job::DoIt(bool issync)
MoveWithResults(SFS_OK);
return SFS_OK;
}
} else if (event == "sync::openw" || event == "openw") {
collectAttributes();
{
eos::common::RWMutexReadLock rlock(gOFS->eosViewRWMutex);
notification->mutable_file()->mutable_owner()->set_username(GetUserName(fmd->getCUid()));
notification->mutable_file()->mutable_owner()->set_groupname(GetGroupName(fmd->getCGid()));
}
notification->mutable_wf()->set_event(cta::eos::Workflow::OPENW);
notification->mutable_wf()->mutable_instance()->set_name(gOFS->MgmOfsInstanceName.c_str());
notification->mutable_file()->set_lpath(fullPath);
notification->mutable_file()->set_fid(mFid);
std::string errorMsg;
return SendProtoWFRequest(this, fullPath, request, errorMsg);
} else if (event == "sync::create" || event == "create") {
collectAttributes();
......
......@@ -2349,23 +2349,6 @@ XrdMgmOfsFile::open(const char* inpath,
}
}
// Also trigger synchronous open-write workflow event if it's defined
if(isRW) {
errno = 0;
workflow.SetFile(path, fileId);
auto workflowType = openOpaque->Get("eos.workflow") != nullptr ? openOpaque->Get("eos.workflow") : "default";
auto ret_wfe = workflow.Trigger("sync::openw", std::string{workflowType}, vid);
if (ret_wfe < 0 && errno == ENOKEY) {
eos_info("msg=\"no workflow defined for sync::openw\"");
} else {
eos_info("msg=\"workflow trigger returned\" retc=%d errno=%d", ret_wfe, errno);
if (ret_wfe != 0) {
// Error from the workflow
rcode = Emsg(epname, error, ret_wfe, "open - synchronous openw workflow error", path);
}
}
}
// add workflow cgis, has to come after create workflow
workflow.SetFile(path, fileId);
if (isRW) {
......
Markdown is supported
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