From c7e093236291e785f03b1409507dabc9e8509f6e Mon Sep 17 00:00:00 2001 From: Ignacio Heredia Date: Mon, 26 Aug 2024 14:35:25 +0200 Subject: [PATCH] fix: avoid restarting module if download failure --- etc/try_me/nomad.hcl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etc/try_me/nomad.hcl b/etc/try_me/nomad.hcl index 7a36732..f938aae 100644 --- a/etc/try_me/nomad.hcl +++ b/etc/try_me/nomad.hcl @@ -112,6 +112,14 @@ job "try-${JOB_UUID}" { memory = 2000 # 2GB memory_max = 2000 # 2GB } + + # Do not try to restart a try-me job if it failis to launch deepaas + # This is usually due to the fact that the Docker image took too long to download + # and failed with error: `Failed to pull `ai4oshub/...`: context deadline` exceeded + # Restarting in the same node won't fix the connectivity issues + restart { + attempts = 0 + mode = "fail" } }