From bc76e3f33915b6f3437b47f011abb7fe94eac877 Mon Sep 17 00:00:00 2001 From: "Da K. Ma" Date: Mon, 9 Jul 2018 20:53:01 +0800 Subject: [PATCH] Skip finished pods when calculating used resources. Signed-off-by: Da K. Ma --- test/util.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/util.go b/test/util.go index b101657461..ed502acb86 100644 --- a/test/util.go +++ b/test/util.go @@ -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() }