open-nomad/e2e/scheduler_system/input/system_job0.nomad
Mahmood Ali 97966c7a71
e2e: Run system jobs on all datacenters (#11060)
Target all e2e datacenters for system and sysbatch e2e tests.  They
require that the system jobs run on all linux clients.

However, the jobs currenly only target `dc1` datacenter, but the nightly
e2e cluster has 4 clients spread in `dc1` and `dc2` datacenters, causing
the tests to fail.

I missed this problem in e2e dev cluster because it only used a single
dc1 datacenter.
2021-08-17 11:01:47 -04:00

38 lines
526 B
HCL

job "system_job" {
datacenters = ["dc1", "dc2"]
type = "system"
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
group "system_job_group" {
count = 1
restart {
attempts = 10
interval = "1m"
delay = "2s"
mode = "delay"
}
task "system_task" {
driver = "docker"
config {
image = "busybox:1"
command = "/bin/sh"
args = ["-c", "sleep 15000"]
}
env {
version = "1"
}
}
}
}