From bcab46d7461f01910010b6944868deab6ebdb48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Pa=C3=9F?= <22845248+mpass99@users.noreply.github.com> Date: Thu, 1 Jun 2023 01:06:42 +0100 Subject: [PATCH] Allow unlimited Nomad reschedules With this measure, we want to avoid template jobs being removed on the second rescheduling. --- internal/environment/template-environment-job.hcl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/internal/environment/template-environment-job.hcl b/internal/environment/template-environment-job.hcl index d18dd40..052a2cc 100644 --- a/internal/environment/template-environment-job.hcl +++ b/internal/environment/template-environment-job.hcl @@ -22,6 +22,13 @@ job "template-0" { attribute = "${node.unique.name}" weight = 100 } + restart { + delay = "0s" + } + reschedule { + unlimited = true + attempts = 0 + } task "default-task" { driver = "docker" @@ -44,10 +51,6 @@ job "template-0" { cpu = 40 memory = 30 } - - restart { - delay = "0s" - } } }