hashicorp/nomad · warning
Group %q has warnings: %v
Error message
Group %q has warnings: %v
What it means
Job.Validate collects per-group warnings by calling tg.Warnings(j) and wraps any returned error as 'Group %q has warnings: %v' inside the returned multi-error. It aggregates the shutdown_delay family of warnings (3083-3086) plus other group-level advisory checks, so the inner %v lists what the group flags.
Source
Thrown at nomad/structs/structs.go:4964
if hasUnscopedGroupService && !hasGroupShutdownDelay && !anyTaskHasShutdownDelay {
warnings = append(warnings, fmt.Errorf(
"group %q defines services, but neither the group nor any of its tasks have shutdown_delay set", tg.Name))
}
return warnings
}
// Warnings returns a list of warnings that may be from dubious settings or
// deprecation warnings.
func (j *Job) Warnings() error {
var mErr multierror.Error
// Check the groups
hasAutoPromote, allAutoPromote := false, true
for _, tg := range j.TaskGroups {
if err := tg.Warnings(j); err != nil {
outer := fmt.Errorf("Group %q has warnings: %v", tg.Name, err)
mErr.Errors = append(mErr.Errors, outer)
}
if u := tg.Update; u != nil {
hasAutoPromote = hasAutoPromote || u.AutoPromote
// Having no canaries implies auto-promotion since there are no canaries to promote.
allAutoPromote = allAutoPromote && (u.Canary == 0 || u.AutoPromote)
}
}
// check if we have services with no shutdown delay set
mErr.Errors = append(mErr.Errors, j.generateServiceShutdownDelayWarnings()...)
// Check AutoPromote, should be all or none
if hasAutoPromote && !allAutoPromote {
err := fmt.Errorf("auto_promote must be true for all groups to enable automatic promotion")
mErr.Errors = append(mErr.Errors, err)View on GitHub (pinned to 482b49bf1a)
Solutions
- Read the inner %v text to see which group warnings were raised.
- Fix the flagged advisory issues (typically add shutdown_delay values).
- Optionally downgrade noise by configuring services/tasks deliberately and documenting accepted warnings.
- Re-run validation to confirm the warning list is empty.
Example fix
// before
group "api" {
task "api" { service { name = "api" } }
}
// after
group "api" {
task "api" { shutdown_delay = "5s"; service { name = "api" } }
} Defensive patterns
Strategy: validation
Validate before calling
for _, tg := range job.TaskGroups {
if warns := tg.Warnings(job); warns != nil {
log.Warnf("group %q warnings: %v", tg.Name, warns)
}
} Prevention
- Capture and review warning text, not just exit codes, from job commands.
- Fix grouped warnings (usually shutdown_delay) at the group level.
- Keep per-group stanzas consistent across a job.
When it happens
Trigger: Validating a job whose task groups return warnings from TaskGroup.Warnings — e.g. services without shutdown_delay, connect sidecar issues. Surfaced through `nomad job run`/`validate` warning output and any CLI path that calls Validate and prints warnings.
Common situations: Deploying connect-enabled services without drain delays; CI that fails on stderr warnings; operators misreading warnings as hard failures (the job may still be submittable depending on the calling command).
Related errors
- Job task group %d missing name
- Job task group %d redefines '%s' from group %d
- Task group %s validation failed: %v
- ErrConnectRequireOneNetwork
- ErrConnectInvalidNetworkMode
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/841cf9a11c4827c8.
Report an issue: GitHub.