open-nomad/scheduler
Mahmood Ali 9d0378cfcc scheduler: warn when system jobs cannot place an alloc
When a system or sysbatch job specify constraints that none of the
current nodes meet, report a warning to the user.

Also, for sysbatch job, mark the job as dead as a result.

A sample run would look like:

```
$ nomad job run ./example.nomad
==> 2021-08-31T16:57:35-04:00: Monitoring evaluation "b48e8882"
    2021-08-31T16:57:35-04:00: Evaluation triggered by job "example"
==> 2021-08-31T16:57:36-04:00: Monitoring evaluation "b48e8882"
    2021-08-31T16:57:36-04:00: Evaluation status changed: "pending" -> "complete"
==> 2021-08-31T16:57:36-04:00: Evaluation "b48e8882" finished with status "complete" but failed to place all allocations:
    2021-08-31T16:57:36-04:00: Task Group "cache" (failed to place 1 allocation):
      * Constraint "${meta.tag} = bar": 2 nodes excluded by filter
      * Constraint "${attr.kernel.name} = linux": 1 nodes excluded by filter

$ nomad job status example
ID            = example
Name          = example
Submit Date   = 2021-08-31T16:57:35-04:00
Type          = sysbatch
Priority      = 50
Datacenters   = dc1
Namespace     = default
Status        = dead
Periodic      = false
Parameterized = false

Summary
Task Group  Queued  Starting  Running  Failed  Complete  Lost
cache       0       0         0        0       0         0

Allocations
No allocations placed
```
2021-08-31 16:58:09 -04:00
..
annotate.go
annotate_test.go
context.go
context_test.go
device.go
device_test.go
feasible.go
feasible_test.go
generic_sched.go core: implement system batch scheduler 2021-08-03 10:30:47 -04:00
generic_sched_test.go
preemption.go
preemption_test.go
propertyset.go
rank.go chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
rank_test.go
reconcile.go
reconcile_test.go
reconcile_util.go
reconcile_util_test.go
scheduler.go core: implement system batch scheduler 2021-08-03 10:30:47 -04:00
scheduler_oss.go
scheduler_sysbatch_test.go scheduler: warn when system jobs cannot place an alloc 2021-08-31 16:58:09 -04:00
scheduler_system.go scheduler: warn when system jobs cannot place an alloc 2021-08-31 16:58:09 -04:00
scheduler_system_test.go core: implement system batch scheduler 2021-08-03 10:30:47 -04:00
select.go chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
select_test.go
spread.go
spread_test.go
stack.go core: implement system batch scheduler 2021-08-03 10:30:47 -04:00
stack_not_ent.go
stack_test.go core: implement system batch scheduler 2021-08-03 10:30:47 -04:00
testing.go
util.go core: implement system batch scheduler 2021-08-03 10:30:47 -04:00
util_test.go core: implement system batch scheduler 2021-08-03 10:30:47 -04:00