Skip to content

Commit

Permalink
Skip finished pods when calculating used resources.
Browse files Browse the repository at this point in the history
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
  • Loading branch information
k82cn committed Jul 9, 2018
1 parent 31a0a98 commit bc76e3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,10 @@ func clusterSize(ctx *context, req v1.ResourceList) int32 {
continue
}

if pod.Status.Phase == v1.PodSucceeded || pod.Status.Phase == v1.PodFailed {
continue
}

if _, found := used[nodeName]; !found {
used[nodeName] = arbapi.EmptyResource()
}
Expand Down

0 comments on commit bc76e3f

Please sign in to comment.