Commit 63433e4b authored by Cedric CAFFY's avatar Cedric CAFFY
Browse files

Added User Archive Request workflow documentation

parent 6ae7909a
......@@ -4,6 +4,7 @@
\usepackage{tikz}
\usepackage[left=1cm, right=1cm, top=1cm, bottom=0.5cm]{geometry}
\usetikzlibrary{shapes,shapes.geometric,arrows}
\usetikzlibrary{positioning}
\begin{document}
\pagestyle{empty}
......@@ -50,7 +51,7 @@
\path [line] (b_requestDeleted) -- (cir_end1);
\path [line] (d_transferSucceeded) -- node [right] {no} (b_addTransferFailure);
\path [line] (b_addTransferFailure) -- (d_nbRetrieveRetries);
\draw [arrow] (d_nbRetrieveRetries.west) |- node[anchor=north east] {no} ([shift={(-2cm,0cm)}]d_nbRetrieveRetries.west) |- ([shift={(-0.8cm,0cm)}]b_queueRQTTFU.west) |- (b_queueRQTTFU.west);
\draw [arrow] (d_nbRetrieveRetries.west) |- node[anchor=north east] {no} ([shift={(-2cm,0cm)}]d_nbRetrieveRetries.west) |- (b_queueRQTTFU.west);
\path [line] (d_nbRetrieveRetries.south) -- node[right] {yes} (b_statusFailed);
\path [line] (b_statusFailed) -- (b_queueRQTRFU);
\path [line] (b_queueRQTRFU) -- node [right] {pop} (b_reportFailureEOS);
......@@ -96,7 +97,7 @@
\path [line] (b_transformedIntoArchive) -- (cir_end1);
\path [line] (d_transferSucceeded) -- node [right] {no} (b_addTransferFailure);
\path [line] (b_addTransferFailure) -- (d_nbRetrieveRetries);
\draw [arrow] (d_nbRetrieveRetries.west) |- node[anchor=north east] {no} ([shift={(-2cm,0cm)}]d_nbRetrieveRetries.west) |- ([shift={(-0.8cm,0cm)}]b_queueRQTTFU.west) |- (b_queueRQTTFU.west);
\draw [arrow] (d_nbRetrieveRetries.west) |- node[anchor=north east] {no} ([shift={(-2cm,0cm)}]d_nbRetrieveRetries.west) |- (b_queueRQTTFU.west);
\path [line] (d_nbRetrieveRetries.south) -- node[right] {yes} (b_statusTRTRFF);
\path [line] (b_statusTRTRFF) -- (b_queueRQTRFU);
\path [line] (b_queueRQTRFU) -- node [right] {pop} (b_updateRepackRequestFailures);
......@@ -105,4 +106,50 @@
\end {tikzpicture}
\end{center}
\newpage
\begin{center}
\begin{tikzpicture}[node distance = 1.5cm, title/.style = {font=\bfseries, align=center}]
% Place nodes
\node [above, font=\bfseries] (b_title) {User Archive Request workflow};
\node [block, below of=b_title, text width=15em] (b_init) {Submission of the Archive Request by the user};
\node [block, below of=b_init, text width=15em] (b_statusTTFU) {Status AJS\_ToTransferForUser};
\node [block, below of=b_statusTTFU, text width=15em] (b_queueAQTTFU) {Queue in ArchiveQueueToTransferForUser};
\node [decision, below of=b_queueAQTTFU] (d_transferSucceeded) {Transfer succeeded ?};
\node [block, right of=d_transferSucceeded, text width=15em,node distance = 7cm] (b_statusToReportToUserForTransfer) {Status AJS\_ToReportToUserForTransfer};
\node [block, below of=b_statusToReportToUserForTransfer, text width=15em] (b_queueInAQTRFU) {Queue in ArchiveQueueToReportForUser};
\node [block, below of=b_queueInAQTRFU, text width=15em] (b_reportJobToEOS) {Report job success/failure to EOS};
\node [decision, below of=b_reportJobToEOS] (d_reportSucceeded) {Report succeeded ?};
\node [block, above right=0.05cm and 1cm of d_reportSucceeded, text width=10em, node distance = 3cm] (b_jobDeleted) {Delete Archive job};
\node [endCircle, right of=b_jobDeleted, node distance = 3.5cm] (cir_end1) {};
\node [decision, below of=d_reportSucceeded, node distance=3.5cm] (d_maxReportRetries) {Number of retries {\textgreater =} max retries ?};
\node [block, below of=d_maxReportRetries,node distance=2.8cm, text width=15em] (b_statusFailed) {Status AJS\_Failed};
\node [block, below of=b_statusFailed, text width=15em] (b_queueAQF) {Queue in ArchiveQueueFailed};
\node [endCircle, right of=b_queueAQF, node distance = 3.5cm] (cir_end2) {};
\node [decision, below of=d_transferSucceeded, node distance=3.5cm] (d_maxTransferRetries) {Number of retries {\textgreater =} max retries ?};
\node [block, below of=d_maxTransferRetries, text width=15em, node distance = 3cm] (b_statusTRTUFF) {Status AJS\_ToReportToUserForFailure};
% Draw edges
\path [line] (b_init) -- (b_statusTTFU);
\path [line] (b_statusTTFU) -- (b_queueAQTTFU);
\path [line] (b_queueAQTTFU) -- node [right, color=black] {Pop + Archive in progress}(d_transferSucceeded);
\path [line] (d_transferSucceeded) -- node [above] {yes} (b_statusToReportToUserForTransfer);
\path [line] (b_statusToReportToUserForTransfer) -- (b_queueInAQTRFU);
\path [line] (b_queueInAQTRFU) -- node [right] {pop} (b_reportJobToEOS);
\path [line] (b_reportJobToEOS) -- (d_reportSucceeded);
\path [line] (d_reportSucceeded) -- node [below right] {yes (job successful)} (b_jobDeleted);
\path [line] (b_jobDeleted) -- (cir_end1);
\path [line] (d_reportSucceeded) -- node [right] {no} (d_maxReportRetries);
\draw [arrow] (d_maxReportRetries.west) |- node[anchor=north east] {no} ([shift={(-2cm,0cm)}]d_maxReportRetries.west) |- (b_queueInAQTRFU.west);
\path [line] (d_maxReportRetries) -- node [right] {yes} (b_statusFailed);
\path [line] (b_statusFailed) -- (b_queueAQF);
\path [line] (b_queueAQF) -- (cir_end2);
\path [line] (d_transferSucceeded) -- node [right] {no} (d_maxTransferRetries);
\draw [arrow] (d_maxTransferRetries.west) |- node[anchor=north east] {no} ([shift={(-2cm,0cm)}]d_maxTransferRetries.west) |- (b_queueAQTTFU.west);
\path [line] (d_maxTransferRetries) -- node [right] {yes} (b_statusTRTUFF);
\draw [arrow] (b_statusTRTUFF.east) -| ([shift={(0.5cm,0cm)}]b_statusTRTUFF.east) |- (b_queueInAQTRFU.west);
\draw [arrow] (d_reportSucceeded.south east) -| node [right] {yes (job failed)} ([shift={(3cm,0cm)}]d_reportSucceeded.south east) |- (b_statusFailed.east);
%\path [line] (b_statusTRTUFF) -- (b_queueInAQTRFU);
\end {tikzpicture}
\end{center}
\end{document}
\ No newline at end of file
......@@ -823,7 +823,7 @@ auto ArchiveRequest::determineNextStep(uint32_t copyNumberUpdated, JobEvent jobE
if (!currentStatus) {
std::stringstream err;
err << "In ArchiveRequest::updateJobStatus(): copynb not found : " << copyNumberUpdated
<< "exiing ones: ";
<< "existing ones: ";
for (auto &j: jl) err << j.copynb() << " ";
throw cta::exception::Exception(err.str());
}
......
......@@ -77,6 +77,7 @@ public:
cta::catalogue::Catalogue & catalogue, log::LogContext & lc);
//Sorter& getSorter();
private:
std::string dispatchArchiveAlgorithms(std::list<std::shared_ptr<ArchiveRequest>> &jobs,const JobQueueType& jobQueueType, const std::string& containerIdentifier,
const std::string& tapepool,std::set<std::string> & jobsIndividuallyGCed,
Agent& agent, AgentReference& agentReference, Backend & objectstore, log::LogContext &lc);
......
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