mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
pods can not admitted should return directly
This commit is contained in:
parent
4fdde68f78
commit
e48f995987
@ -73,18 +73,20 @@ func (kl *Kubelet) runOnce(pods []*api.Pod, retryDelay time.Duration) (results [
|
||||
// Check if we can admit the pod.
|
||||
if ok, reason, message := kl.canAdmitPod(admitted, pod); !ok {
|
||||
kl.rejectPod(pod, reason, message)
|
||||
} else {
|
||||
admitted = append(admitted, pod)
|
||||
results = append(results, RunPodResult{pod, nil})
|
||||
continue
|
||||
}
|
||||
|
||||
admitted = append(admitted, pod)
|
||||
go func(pod *api.Pod) {
|
||||
err := kl.runPod(pod, retryDelay)
|
||||
ch <- RunPodResult{pod, err}
|
||||
}(pod)
|
||||
}
|
||||
|
||||
glog.Infof("waiting for %d pods", len(pods))
|
||||
glog.Infof("Waiting for %d pods", len(admitted))
|
||||
failedPods := []string{}
|
||||
for i := 0; i < len(pods); i++ {
|
||||
for i := 0; i < len(admitted); i++ {
|
||||
res := <-ch
|
||||
results = append(results, res)
|
||||
if res.Err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user