hashicorp/nomad · error
no attribute value set
Error message
no attribute value set
What it means
Attribute.Validate: none of the Float/Int/String/Bool value fields is set. An attribute must carry exactly one value to be usable in constraints and node metadata.
Source
Thrown at plugins/shared/structs/attribute.go:274
}
// Assert only one of the attributes is set
set := 0
if a.Float != nil {
set++
}
if a.Int != nil {
set++
}
if a.String != nil {
set++
}
if a.Bool != nil {
set++
}
if set == 0 {
return fmt.Errorf("no attribute value set")
} else if set > 1 {
return fmt.Errorf("only one attribute value may be set")
}
return nil
}
// Comparable returns whether the two attributes are comparable
func (a *Attribute) Comparable(b *Attribute) bool {
if a == nil || b == nil {
return false
}
// First use the units to decide if comparison is possible
aUnit := a.getTypedUnit()
bUnit := b.getTypedUnit()
if aUnit != nil && bUnit != nil {
return aUnit.Comparable(bUnit)View on GitHub (pinned to 482b49bf1a)
Solutions
- Set exactly one value field (float, int, string, or bool) on the attribute
- Verify the producer of the attribute populates its value
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at plugins/shared/structs/attribute.go:274 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/b4c3de271ce2da28.
Report an issue: GitHub.