mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
dra scheduler: fix incorrect tracking of claim candidates for reallocation
When dealing with unschedulable pods, the intent was to deallocate only claims which are allocated and use delayed allocation. That if check wasn't handled correctly, causing also claims with immediate allocation to be considered as candidates. Found during code reading, probably has never occurred in practice yet.
This commit is contained in:
parent
d647d19f6a
commit
b0d4a8cd6d
@ -754,7 +754,7 @@ func (pl *dynamicResources) Filter(ctx context.Context, cs *framework.CycleState
|
||||
// would just get allocated again for a random node,
|
||||
// which is unlikely to help the pod.
|
||||
if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer {
|
||||
state.unavailableClaims.Insert(unavailableClaims...)
|
||||
state.unavailableClaims.Insert(index)
|
||||
}
|
||||
}
|
||||
return statusUnschedulable(logger, "resourceclaim not available on the node", "pod", klog.KObj(pod))
|
||||
|
Loading…
Reference in New Issue
Block a user