mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +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,16 +1052,9 @@ func GetPodsScheduled(workerNodes sets.String, pods *v1.PodList) (scheduledPods,
|
|||||||
framework.ExpectEqual(scheduledCondition.Status, v1.ConditionTrue)
|
framework.ExpectEqual(scheduledCondition.Status, v1.ConditionTrue)
|
||||||
scheduledPods = append(scheduledPods, pod)
|
scheduledPods = append(scheduledPods, pod)
|
||||||
}
|
}
|
||||||
} else {
|
} else if pod.Spec.NodeName == "" {
|
||||||
_, 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)
|
notScheduledPods = append(notScheduledPods, pod)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user