mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
Merge pull request #97302 from jindezgm/patch-1
Refresh Timestamp when pod is not present in the three sub-queues
This commit is contained in:
commit
8c6f244c18
@ -302,8 +302,6 @@ func (p *PriorityQueue) AddUnschedulableIfNotPresent(pInfo *framework.QueuedPodI
|
|||||||
return fmt.Errorf("pod: %v is already present in unschedulable queue", nsNameForPod(pod))
|
return fmt.Errorf("pod: %v is already present in unschedulable queue", nsNameForPod(pod))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refresh the timestamp since the pod is re-added.
|
|
||||||
pInfo.Timestamp = p.clock.Now()
|
|
||||||
if _, exists, _ := p.activeQ.Get(pInfo); exists {
|
if _, exists, _ := p.activeQ.Get(pInfo); exists {
|
||||||
return fmt.Errorf("pod: %v is already present in the active queue", nsNameForPod(pod))
|
return fmt.Errorf("pod: %v is already present in the active queue", nsNameForPod(pod))
|
||||||
}
|
}
|
||||||
@ -311,6 +309,9 @@ func (p *PriorityQueue) AddUnschedulableIfNotPresent(pInfo *framework.QueuedPodI
|
|||||||
return fmt.Errorf("pod %v is already present in the backoff queue", nsNameForPod(pod))
|
return fmt.Errorf("pod %v is already present in the backoff queue", nsNameForPod(pod))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Refresh the timestamp since the pod is re-added.
|
||||||
|
pInfo.Timestamp = p.clock.Now()
|
||||||
|
|
||||||
// If a move request has been received, move it to the BackoffQ, otherwise move
|
// If a move request has been received, move it to the BackoffQ, otherwise move
|
||||||
// it to unschedulableQ.
|
// it to unschedulableQ.
|
||||||
if p.moveRequestCycle >= podSchedulingCycle {
|
if p.moveRequestCycle >= podSchedulingCycle {
|
||||||
|
Loading…
Reference in New Issue
Block a user