node pools: implement support in scheduler (#17443)

Implement scheduler support for node pool:

* When a scheduler is invoked, we get a set of the ready nodes in the DCs that
  are allowed for that job. Extend the filter to include the node pool.
* Ensure that changes to a job's node pool are picked up as destructive
  allocation updates.
* Add `NodesInPool` as a metric to all reporting done by the scheduler.
* Add the node-in-pool the filter to the `Node.Register` RPC so that we don't
  generate spurious evals for nodes in the wrong pool.
This commit is contained in:
Tim Gross
2023-06-07 10:39:03 -04:00
committed by GitHub
parent 354d741c95
commit 9a6078a2ae
16 changed files with 153 additions and 18 deletions

View File

@@ -235,6 +235,7 @@ func TestMonitor_formatAllocMetric(t *testing.T) {
Name: "display all possible scores",
Metrics: &api.AllocationMetric{
NodesEvaluated: 3,
NodesInPool: 3,
ScoreMetaData: []*api.NodeScoreMeta{
{
NodeID: "node-1",