github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/e2e/clientstate/restarter.nomad (about) 1 # Restarter fakes being a flaky service that crashes and restarts constantly. 2 # Restarting the Nomad agent during task restarts was a known cause of state 3 # corruption in v0.8. 4 5 job "restarter" { 6 datacenters = ["dc1"] 7 8 constraint { 9 attribute = "${attr.kernel.name}" 10 value = "linux" 11 } 12 13 group "restarter" { 14 restart { 15 attempts = 100 16 delay = "3s" 17 } 18 19 task "restarter" { 20 driver = "raw_exec" 21 22 config { 23 command = "/bin/bash" 24 args = ["-c", "echo $$ >> pid && sleep 1 && exit 99"] 25 } 26 } 27 } 28 }