hashicorp/nomad · error
ignore_warnings on check_restart only supported for Consul s
Error message
ignore_warnings on check_restart only supported for Consul service checks
What it means
check_restart.ignore_warnings suppresses restarts on warning states, which only exist for Consul checks; Nomad checks have no warning state, so validateNomad rejects the setting as a temporary limitation (hashicorp/team-nomad#354).
Source
Thrown at nomad/structs/services.go:373
}
// expose is connect (consul) specific
if sc.Expose {
return errors.New("expose may only be set for Consul service checks")
}
// nomad checks do not have warnings
if sc.OnUpdate == OnUpdateIgnoreWarn {
return errors.New("on_update may only be set to ignore_warnings for Consul service checks")
}
// below are temporary limitations on checks in nomad
// https://github.com/hashicorp/team-nomad/issues/354
// check_restart.ignore_warnings is not a thing in Nomad (which has no warnings in checks)
if sc.CheckRestart != nil {
if sc.CheckRestart.IgnoreWarnings {
return errors.New("ignore_warnings on check_restart only supported for Consul service checks")
}
}
// address_mode="driver" not yet supported on nomad
if sc.AddressMode == "driver" {
return errors.New("address_mode = driver may only be set for Consul service checks")
}
if sc.Type == "http" {
if sc.Method != "" && !helper.IsMethodHTTP(sc.Method) {
return fmt.Errorf("method type %q not supported in Nomad http check", sc.Method)
}
}
// success_before_passing is consul only
if sc.SuccessBeforePassing != 0 {
return errors.New("success_before_passing may only be set for Consul service checks")
}View on GitHub (pinned to 482b49bf1a)
Solutions
- Remove ignore_warnings from the check_restart block
- Keep check_restart but omit ignore_warnings for nomad checks
- Use a Consul service provider if ignore_warnings is required
Example fix
// before
check_restart {
ignore_warnings = true
}
// after
check_restart {
limit = 3
} Defensive patterns
Strategy: validation
Validate before calling
if check.CheckRestart != nil && check.CheckRestart.IgnoreWarnings && service.Provider != "consul" {
return fmt.Errorf("check %q: check_restart.ignore_warnings requires consul provider", check.Name)
} Try / catch
if err := job.Validate(); err != nil {
if strings.Contains(err.Error(), "ignore_warnings on check_restart") {
// drop ignore_warnings from check_restart
}
} Prevention
- Avoid ignore_warnings in templated update/check_restart blocks
- Track Nomad docs for when the temporary limitation lifts
- Run nomad job validate in CI
When it happens
Trigger: Defining a check_restart block with ignore_warnings = true on a check of a non-Consul service.
Common situations: Shared update stanza templates applied to both consul and nomad services; following Consul-oriented docs while using nomad service discovery.
Related errors
- expose may only be set for Consul service checks
- on_update may only be set to ignore_warnings for Consul serv
- address_mode = driver may only be set for Consul service che
- success_before_passing may only be set for Consul service ch
- failures_before_critical may only be set for Consul service
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/43b0199e80c2c204.
Report an issue: GitHub.