How to find out why a job placement is failing with a constraint

I am wanting to create a constraint so that a job will be placed on a specific node or not placed at all. I have tried two ways and both are failing placement. How do I find more information about why specifically it is failing?

There is 128gigs of ram and 36 cores on the box. No other jobs are running. So there is absolutely no reason for it not to run. It does place and run without the constraint specified.

Here is the configuration

Client config:

meta = {
  "instance_type" = "Haswell XL",
  "location"      = "Miami",
  "type"          = "Application Plane"
  "hostname"      = "app1"
}

Manifest configuration:

job "brad" {
  datacenters = ["miami"]
  type        = "service"

  constraint {
    attribute = "${meta.hostname}"
    value     = "app1"
  }
  group "game" {

I also tried this constraint.

job "brad" {
  datacenters = ["miami"]
  type        = "service"

  constraint {
    attribute = "${unique.hostname}"
    value     = "app1"
  }

  group "game" {

when I try to place the job I get the following warning:

game 1 unplaced

  • Constraint ${meta.hostname} = app1 filtered 2 nodes
  • Constraint computed class ineligible filtered 1 node

and

game 1 unplaced

  • Constraint ${unique.hostname} = app1 filtered 2 nodes
  • Constraint computed class ineligible filtered 1 node

Thanks
Brad

I was able to make it work with the following:

constraint {
    attribute = "${attr.unique.hostname}"
    value     = "app1"
  }

I had forgot attr in the attribute name. I am still confused why by using the meta.hostname also failed.

Any how.
Brad