hashicorp/nomad · error
scheduler resulted in an unexpected number of eval updates:
Error message
scheduler resulted in an unexpected number of eval updates: %v
What it means
Fires in Job.Plan when the dry-run scheduler did not produce exactly one evaluation update; this is an internal invariant violation (planner mock got an unexpected count), usually indicating a scheduler bug rather than user error.
Source
Thrown at nomad/job_endpoint.go:1925
if plans := len(planner.Plans); plans != 1 {
return fmt.Errorf("scheduler resulted in an unexpected number of plans: %v", plans)
}
annotations := planner.Plans[0].Annotations
if args.Diff {
jobDiff, err := existingJob.Diff(args.Job, true)
if err != nil {
return fmt.Errorf("failed to create job diff: %v", err)
}
if err := scheduler.Annotate(jobDiff, annotations); err != nil {
return fmt.Errorf("failed to annotate job diff: %v", err)
}
reply.Diff = jobDiff
}
// Grab the failures
if len(planner.Evals) != 1 {
return fmt.Errorf("scheduler resulted in an unexpected number of eval updates: %v", planner.Evals)
}
updatedEval := planner.Evals[0]
// If it is a periodic job calculate the next launch
if args.Job.IsPeriodic() && args.Job.Periodic.Enabled {
reply.NextPeriodicLaunch, err = args.Job.Periodic.Next(time.Now().In(args.Job.Periodic.GetLocation()))
if err != nil {
return fmt.Errorf("Failed to parse cron expression: %v", err)
}
}
reply.FailedTGAllocs = updatedEval.FailedTGAllocs
reply.JobModifyIndex = index
reply.Annotations = annotations
reply.CreatedEvals = planner.CreateEvals
reply.Index = index
return nil
}View on GitHub (pinned to 482b49bf1a)
Solutions
- Retry the plan on a healthy server
- Report as a bug with the job spec and Nomad version if reproducible
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at nomad/job_endpoint.go:1925 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/9d29db65409dc33e.
Report an issue: GitHub.