{"record":{"id":"99b06319488ea210","repo":"hashicorp/nomad","slug":"failed-to-convert-rtarget-q-to-uint64-v-99b063","errorCode":null,"errorMessage":"failed to convert RTarget %q to uint64: %v","messagePattern":"failed to convert RTarget %q to uint64: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scheduler/feasible/propertyset.go","lineNumber":96,"sourceCode":"func (p *propertySet) SetJobConstraint(constraint *structs.Constraint) {\n\tp.setConstraint(constraint, \"\")\n}\n\n// SetTGConstraint is used to parameterize the property set for a\n// distinct_property constraint set at the task group level. The inputs are the\n// constraint and the task group name.\nfunc (p *propertySet) SetTGConstraint(constraint *structs.Constraint, taskGroup string) {\n\tp.setConstraint(constraint, taskGroup)\n}\n\n// setConstraint is a shared helper for setting a job or task group constraint.\nfunc (p *propertySet) setConstraint(constraint *structs.Constraint, taskGroup string) {\n\tvar allowedCount uint64\n\t// Determine the number of allowed allocations with the property.\n\tif v := constraint.RTarget; v != \"\" {\n\t\tc, err := strconv.ParseUint(v, 10, 64)\n\t\tif err != nil {\n\t\t\tp.errorBuilding = fmt.Errorf(\"failed to convert RTarget %q to uint64: %v\", v, err)\n\t\t\tp.logger.Error(\"failed to convert RTarget to uint64\", \"RTarget\", v, \"error\", err)\n\t\t\treturn\n\t\t}\n\n\t\tallowedCount = c\n\t} else {\n\t\tallowedCount = 1\n\t}\n\tp.setTargetAttributeWithCount(constraint.LTarget, allowedCount, taskGroup)\n}\n\n// SetTargetAttribute is used to populate this property set without also storing allowed count\n// This is used when evaluating spread blocks\nfunc (p *propertySet) SetTargetAttribute(targetAttribute string, taskGroup string) {\n\tp.setTargetAttributeWithCount(targetAttribute, 0, taskGroup)\n}\n\n// setTargetAttributeWithCount is a shared helper for setting a job or task group attribute and allowedCount","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/scheduler/feasible/propertyset.go#L78-L114","documentation":"PropertySet constraint helper error: the right-hand target of a distinct_property constraint cannot be converted to uint64 (e.g. a non-numeric string where a number is required). The offending RTarget value is quoted in the message.","triggerScenarios":"Thrown at scheduler/feasible/propertyset.go:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a numeric value on the right side of the constraint","Quote or correct the constraint value so it matches the node attribute's type"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}