Skip to content

Commit

Permalink
Merge pull request #291 from k82cn/skip_finished_pods
Browse files Browse the repository at this point in the history
Skip finished pods when calculating used resources.
  • Loading branch information
k82cn authored Jul 9, 2018
2 parents 31a0a98 + bc76e3f commit 599656e
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 599656e

Please sign in to comment.