mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #92603 from hasheddan/schedule-part-three
Do not raise exception if unscheduled Pod status is unknown
This commit is contained in:
commit
9fb637152c
@ -1052,15 +1052,8 @@ func GetPodsScheduled(workerNodes sets.String, pods *v1.PodList) (scheduledPods,
|
||||
framework.ExpectEqual(scheduledCondition.Status, v1.ConditionTrue)
|
||||
scheduledPods = append(scheduledPods, pod)
|
||||
}
|
||||
} else {
|
||||
_, scheduledCondition := podutil.GetPodCondition(&pod.Status, v1.PodScheduled)
|
||||
framework.ExpectEqual(scheduledCondition != nil, true)
|
||||
if scheduledCondition != nil {
|
||||
framework.ExpectEqual(scheduledCondition.Status, v1.ConditionFalse)
|
||||
if scheduledCondition.Reason == "Unschedulable" {
|
||||
notScheduledPods = append(notScheduledPods, pod)
|
||||
}
|
||||
}
|
||||
} else if pod.Spec.NodeName == "" {
|
||||
notScheduledPods = append(notScheduledPods, pod)
|
||||
}
|
||||
}
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user