summaryrefslogtreecommitdiffstats
path: root/src/endpoint/mod.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-11-15 11:35:32 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-11-15 11:39:34 +0100
commit771f957d4202bfa15820dc004b9cb874a32b7746 (patch)
tree302b918379b0a8289921d55ef431bef37279d6d9 /src/endpoint/mod.rs
parent183eac77bfd87eb5c2d8e2832d3fe35779ec5fef (diff)
Implement error reporting of failed jobs
This patch implements error reporting if a container job did not end successfully. It does so by adding an error type `ContainerError`, which is either an error that describes that a container did not exit with success, or an anyhow::Error (that describes an error from the container management code). The algorithm of log-aggregation is now intercepted to catch any exit-state log items. If there is no exit-state from the container (No line with "#BUTIDO:STATE:..."), no error is assumed. Here could be a warning later on. The so aggregated state is then passed up to the orchestrator, which then collects the errors and prints them. If the implementation is correct (which is not tested yet, because this is rather difficult to test), all other containers should continue operation until they are ready, before the errors are handled. The code responsible for this (in the Orchestrator implementation) was adapted to not collect until the first error, but collect everything and then check for errors. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/endpoint/mod.rs')
-rw-r--r--src/endpoint/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/endpoint/mod.rs b/src/endpoint/mod.rs
index 316a8f3..c66e52f 100644
--- a/src/endpoint/mod.rs
+++ b/src/endpoint/mod.rs
@@ -1,6 +1,9 @@
mod configuration;
pub use configuration::*;
+mod error;
+pub use error::*;
+
mod scheduler;
pub use scheduler::*;