2018-06-05 17:54:08 +00:00
|
|
|
job "demo2" {
|
|
|
|
datacenters = ["dc1"]
|
|
|
|
type = "service"
|
|
|
|
|
|
|
|
group "t2" {
|
|
|
|
count = 3
|
|
|
|
|
|
|
|
task "t2" {
|
|
|
|
driver = "raw_exec"
|
|
|
|
|
|
|
|
config {
|
|
|
|
command = "bash"
|
|
|
|
args = ["-c", "if (($RANDOM%2)); then sleep 200000 ; else exit -1 ; fi"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
update {
|
2019-07-20 14:55:07 +00:00
|
|
|
max_parallel = 1
|
|
|
|
min_healthy_time = "1s"
|
|
|
|
auto_revert = false
|
|
|
|
healthy_deadline = "2s"
|
2018-06-05 17:54:08 +00:00
|
|
|
progress_deadline = "30s"
|
|
|
|
}
|
|
|
|
|
|
|
|
restart {
|
|
|
|
attempts = 0
|
|
|
|
mode = "fail"
|
|
|
|
}
|
|
|
|
|
|
|
|
reschedule {
|
2019-07-20 14:55:07 +00:00
|
|
|
unlimited = "true"
|
2018-06-05 17:54:08 +00:00
|
|
|
delay_function = "constant"
|
2019-07-20 14:55:07 +00:00
|
|
|
delay = "5s"
|
2018-06-05 17:54:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|