kubernetes-retired / kube-batch

A batch scheduler of kubernetes for high performance workload, e.g. AI/ML, BigData, HPC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

should we add Failed Status in AllocatedStatus func

davidstack opened this issue · comments

when the pod is in Failed status, the pod have scheduled on the node. the description of Failed is
All Containers in the Pod have terminated, and at least one Container has terminated in failure. That is, the Container either exited with non-zero status or was terminated by the system.

the AllocatedStatus in /pkg/scheduler/api/helpers.go now is

`
// AllocatedStatus checks whether the tasks has AllocatedStatus

func AllocatedStatus(status TaskStatus) bool {
switch status {
case Bound, Binding, Running, Allocated:
return true
default:
return false
}
}

`

the pod was scheduled to the node, but it does not consume resources; so we should not include it, similar to Succeed.

ok,thanks