open-nomad/e2e/clientstate/restarter.nomad

24 lines
487 B
Plaintext
Raw Normal View History

# Restarter fakes being a flaky service that crashes and restarts constantly.
# Restarting the Nomad agent during task restarts was a known cause of state
# corruption in v0.8.
job "restarter" {
datacenters = ["dc1"]
2019-10-11 12:00:05 +00:00
group "restarter" {
restart {
attempts = 100
delay = "3s"
}
2019-10-11 12:00:05 +00:00
task "restarter" {
driver = "raw_exec"
2019-10-11 12:00:05 +00:00
config {
command = "/bin/bash"
args = ["-c", "echo $$ >> pid && sleep 1 && exit 99"]
}
}
}
}