open-nomad/e2e/rescheduling/input/reschedule_success.hcl

30 lines
508 B
HCL
Raw Normal View History

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