mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #98899 from Huang-Wei/remove-unknown-event
sched: remove Unknown queuing literal
This commit is contained in:
commit
ccdc59d26e
@ -118,14 +118,8 @@ func (sched *Scheduler) updateNodeInCache(oldObj, newObj interface{}) {
|
|||||||
klog.Errorf("scheduler cache UpdateNode failed: %v", err)
|
klog.Errorf("scheduler cache UpdateNode failed: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only activate unschedulable pods if the node became more schedulable.
|
// Only requeue unschedulable pods if the node became more schedulable.
|
||||||
// We skip the node property comparison when there is no unschedulable pods in the queue
|
if event := nodeSchedulingPropertiesChange(newNode, oldNode); event != "" {
|
||||||
// to save processing cycles. We still trigger a move to active queue to cover the case
|
|
||||||
// that a pod being processed by the scheduler is determined unschedulable. We want this
|
|
||||||
// pod to be reevaluated when a change in the cluster happens.
|
|
||||||
if sched.SchedulingQueue.NumUnschedulablePods() == 0 {
|
|
||||||
sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(queue.Unknown)
|
|
||||||
} else if event := nodeSchedulingPropertiesChange(newNode, oldNode); event != "" {
|
|
||||||
sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(event)
|
sched.SchedulingQueue.MoveAllToActiveOrBackoffQueue(event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,6 @@ package queue
|
|||||||
|
|
||||||
// Events that trigger scheduler queue to change.
|
// Events that trigger scheduler queue to change.
|
||||||
const (
|
const (
|
||||||
// Unknown event
|
|
||||||
Unknown = "Unknown"
|
|
||||||
// PodAdd is the event when a new pod is added to API server.
|
// PodAdd is the event when a new pod is added to API server.
|
||||||
PodAdd = "PodAdd"
|
PodAdd = "PodAdd"
|
||||||
// NodeAdd is the event when a new node is added to the cluster.
|
// NodeAdd is the event when a new node is added to the cluster.
|
||||||
@ -63,9 +61,9 @@ const (
|
|||||||
NodeSpecUnschedulableChange = "NodeSpecUnschedulableChange"
|
NodeSpecUnschedulableChange = "NodeSpecUnschedulableChange"
|
||||||
// NodeAllocatableChange is the event when node allocatable is changed.
|
// NodeAllocatableChange is the event when node allocatable is changed.
|
||||||
NodeAllocatableChange = "NodeAllocatableChange"
|
NodeAllocatableChange = "NodeAllocatableChange"
|
||||||
// NodeLabelsChange is the event when node label is changed.
|
// NodeLabelChange is the event when node label is changed.
|
||||||
NodeLabelChange = "NodeLabelChange"
|
NodeLabelChange = "NodeLabelChange"
|
||||||
// NodeTaintsChange is the event when node taint is changed.
|
// NodeTaintChange is the event when node taint is changed.
|
||||||
NodeTaintChange = "NodeTaintChange"
|
NodeTaintChange = "NodeTaintChange"
|
||||||
// NodeConditionChange is the event when node condition is changed.
|
// NodeConditionChange is the event when node condition is changed.
|
||||||
NodeConditionChange = "NodeConditionChange"
|
NodeConditionChange = "NodeConditionChange"
|
||||||
|
Loading…
Reference in New Issue
Block a user