hashicorp/nomad · error
minimum CPU value is %d; got %d
Error message
minimum CPU value is %d; got %d
What it means
Resources.MeetsMinResources() (a COMPAT/0.10 legacy check) verifies that a task's CPU request meets the cluster's minimum defined by MinResources(). The check is skipped when the job uses the newer Cores field (r.Cores != 0), since cores-based specs define CPU differently.
Source
Thrown at nomad/structs/structs.go:2602
r.Devices = nil
}
for _, n := range r.Networks {
n.Canonicalize()
}
r.NUMA.Canonicalize()
}
// MeetsMinResources returns an error if the resources specified are less than
// the minimum allowed.
// This is based on the minimums defined in the Resources type
// COMPAT(0.10): Remove in 0.10
func (r *Resources) MeetsMinResources() error {
var mErr multierror.Error
minResources := MinResources()
if r.CPU < minResources.CPU && r.Cores == 0 {
mErr.Errors = append(mErr.Errors, fmt.Errorf("minimum CPU value is %d; got %d", minResources.CPU, r.CPU))
}
if r.MemoryMB < minResources.MemoryMB {
mErr.Errors = append(mErr.Errors, fmt.Errorf("minimum MemoryMB value is %d; got %d", minResources.MemoryMB, r.MemoryMB))
}
return mErr.ErrorOrNil()
}
// Copy returns a deep copy of the resources
func (r *Resources) Copy() *Resources {
if r == nil {
return nil
}
return &Resources{
CPU: r.CPU,
Cores: r.Cores,
MemoryMB: r.MemoryMB,
MemoryMaxMB: r.MemoryMaxMB,
DiskMB: r.DiskMB,View on GitHub (pinned to 482b49bf1a)
Solutions
- Raise Resources.CPU (cpu) to at least minResources.CPU as reported in the error
- Use the Cores field instead for CPU allocation, which bypasses the legacy CPU check
- Update the job template to current Nomad minimum resource values
Example fix
// before
resources {
cpu = 50
}
// after
resources {
cpu = 100
} Defensive patterns
Strategy: validation
Validate before calling
min := structs.MinResources()
if r.Cores == 0 && r.CPU < min.CPU {
return fmt.Errorf("cpu must be >= %d", min.CPU)
} Type guard
func meetsMinCPU(r *structs.Resources) bool { return r.Cores != 0 || r.CPU >= structs.MinResources().CPU } Prevention
- Pin CPU requests to at least the minimum in job templates
- Prefer the cores field for CPU allocation on newer Nomad
- Refresh templates when upgrading Nomad versions as minimums change
When it happens
Trigger: Submitting a job spec with Resources.CPU below the MinResources() CPU floor while Cores is 0, e.g. cpu = 50 with minimum 100.
Common situations: Porting old or hand-minimized job files; downgrading CPU to fit more tasks; specs written for clusters with different minimums; legacy templates predating current minimums.
Related errors
- Task can only ask for 'cpu' or 'cores' resource, not both.
- Missing task resources
- MemoryMaxMB value (%d) should be larger than MemoryMB value
- SecretsMB value (%d) cannot be larger than MemoryMB value (%
- SecretsMB value (%d) cannot be negative
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/6e507e1f0b3abc03.
Report an issue: GitHub.