We have a nomad job that is supposed to run 30 tasks on 30 different nodes. We use terraform to provision 30 ec2 instances specifically for this job. Here are the constraints:
// top level
“Constraints”: [
{
“LTarget”: “”,
“Operand”: “distinct_hosts”,
“RTarget”: “true”
}
],
…
“TaskGroups”: [
{
“Constraints”: [
{
“LTarget”: “${meta.ResourceId}”,
“Operand”: “==”,
“RTarget”: “our-cluster-tag”
}
],
“Count”: 30,
…
}
]
When we run the job, it shows the following message:
main 2 unplaced
Constraint distinct_hosts filtered 28 nodes
Constraint {meta.ResourceId} == our-cluster-tag filtered nodes
I checked aws console and for sure we have 30 ec2 instances running. From nomad documentation, I can only find how to check logs for each allocation (in this case I only have 28 allocations and they are running fine).
So the question is: how do I debug placement failure issue with nomad?