core: plumbing to support numa aware scheduling (#18681)

* core: plumbing to support numa aware scheduling

* core: apply node resources compatibility upon fsm rstore

Handle the case where an upgraded server dequeus an evaluation before
a client triggers a new fingerprint - which would be needed to cause
the compatibility fix to run. By running the compat fix on restore the
server will immediately have the compatible pseudo topology to use.

* lint: learn how to spell pseudo
This commit is contained in:
Seth Hoenig
2023-10-19 15:09:30 -05:00
committed by GitHub
parent 0410b8acea
commit 83720740f5
56 changed files with 1299 additions and 1487 deletions

View File

@@ -12,10 +12,10 @@ import (
"strings"
"sync"
"github.com/hashicorp/nomad/client/lib/idset"
"github.com/hashicorp/nomad/helper"
hargs "github.com/hashicorp/nomad/helper/args"
"github.com/hashicorp/nomad/helper/escapingfs"
"github.com/hashicorp/nomad/lib/cpuset"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/plugins/drivers"
"github.com/zclconf/go-cty/cty"
@@ -773,7 +773,7 @@ func (b *Builder) setAlloc(alloc *structs.Allocation) *Builder {
// Populate task resources
if tr, ok := alloc.AllocatedResources.Tasks[b.taskName]; ok {
b.cpuLimit = tr.Cpu.CpuShares
b.cpuCores = cpuset.New(tr.Cpu.ReservedCores...).String()
b.cpuCores = idset.From[uint16](tr.Cpu.ReservedCores).String()
b.memLimit = tr.Memory.MemoryMB
b.memMaxLimit = tr.Memory.MemoryMaxMB