mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
scheduler: non-nil err when no devices match (#24118)
This commit is contained in:
@@ -506,7 +506,9 @@ NEXTNODE:
|
||||
devices: set.From(task.Resources.NUMA.GetDevices()),
|
||||
}
|
||||
|
||||
offer, sumAffinities, err := devAllocator.createOffer(memory, device)
|
||||
var offer *structs.AllocatedDeviceResource
|
||||
var sumAffinities float64
|
||||
offer, sumAffinities, err = devAllocator.createOffer(memory, device)
|
||||
if offer == nil || err != nil {
|
||||
devAllocator = devAllocatorSnapshot
|
||||
taskResources.Devices = taskResourcesSnapshot
|
||||
@@ -554,6 +556,7 @@ NEXTNODE:
|
||||
|
||||
// If preemption is not enabled, then this node is exhausted.
|
||||
if !iter.evict {
|
||||
// surface err from createOffer()
|
||||
iter.ctx.Metrics().ExhaustedNode(option.Node, fmt.Sprintf("devices: %s", err))
|
||||
continue NEXTNODE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user