X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=terraform-ci-infra%2F1n_nmd%2Fgrafana%2Fconf%2Fnomad%2Fgrafana.hcl;h=a759abc4f7f3d83f5b3de3feb0821c48b49aa408;hp=7325c6aef425a536346def543d1286eef17d7899;hb=9481aad815189d6251d36c11e3f901f9179dab40;hpb=25b6f92f64abf9478a6bf9de81494d90402f8919;ds=sidebyside diff --git a/terraform-ci-infra/1n_nmd/grafana/conf/nomad/grafana.hcl b/terraform-ci-infra/1n_nmd/grafana/conf/nomad/grafana.hcl index 7325c6aef4..a759abc4f7 100644 --- a/terraform-ci-infra/1n_nmd/grafana/conf/nomad/grafana.hcl +++ b/terraform-ci-infra/1n_nmd/grafana/conf/nomad/grafana.hcl @@ -71,6 +71,17 @@ job "${job_name}" { %{ endif } } + # The reschedule stanza specifies the group's rescheduling strategy. If + # specified at the job level, the configuration will apply to all groups + # within the job. If the reschedule stanza is present on both the job and the + # group, they are merged with the group stanza taking the highest precedence + # and then the job. + reschedule { + delay = "30s" + delay_function = "constant" + unlimited = true + } + # The "group" stanza defines a series of tasks that should be co-located on # the same Nomad client. Any task within a group will be placed on the same # client. @@ -86,6 +97,17 @@ job "${job_name}" { # to 1. count = ${group_count} + # The restart stanza configures a tasks's behavior on task failure. Restarts + # happen on the client that is running the task. + # + # https://www.nomadproject.io/docs/job-specification/restart + # + restart { + interval = "30m" + attempts = 40 + delay = "15s" + mode = "delay" + } # The constraint allows restricting the set of eligible nodes. Constraints # may filter on attributes or client metadata. @@ -120,7 +142,7 @@ job "${job_name}" { # documentation for more information. config { image = "${image}" - dns_servers = [ "$${attr.unique.network.ip-address}" ] + dns_servers = [ "172.17.0.1" ] volumes = [ "secrets/prometheus.yml:/etc/grafana/provisioning/datasources/prometheus.yml", "secrets/dashboards.yml:/etc/grafana/provisioning/dashboards/dashboards.yml",