open-nomad/e2e/rescheduling/input/reschedule_success.hcl
2018-03-29 11:35:45 -05:00

30 lines
508 B
HCL

job "test3" {
datacenters = ["dc1"]
type = "service"
group "t3" {
count = 3
task "t3" {
driver = "raw_exec"
config {
command = "bash"
args = ["-c", "a=`cksum <<< \"${NOMAD_ALLOC_ID}\"| cut -d ' ' -f1`; if ! (( a % 2 )); then sleep 5000; else exit -1; fi"]
}
}
restart {
attempts = 0
delay = "0s"
mode = "fail"
}
reschedule {
attempts = 2
interval = "5m"
unlimited = false
}
}
}