From ddb04529e90cdf8fe64464ab8df72c26621d27ac Mon Sep 17 00:00:00 2001 From: Marcin Wielgus Date: Wed, 21 Jun 2017 15:47:47 +0200 Subject: [PATCH] Don't skip node groups that help only besteffort pods in price expander --- cluster-autoscaler/expander/price/price.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cluster-autoscaler/expander/price/price.go b/cluster-autoscaler/expander/price/price.go index 04202e2aa7..138a6fdae4 100644 --- a/cluster-autoscaler/expander/price/price.go +++ b/cluster-autoscaler/expander/price/price.go @@ -105,10 +105,10 @@ nextoption: } totalPodPrice += podPrice } - if totalPodPrice == 0 { - glog.Warningf("Total pod price is 0, skipping %s", option.NodeGroup.Id()) - continue - } + // Total pod price is 0 when the pods have no requests. The pods must have some other + // requirements that prevent them from scheduling like AntiAffinity, HostPort or the + // pods quota on all nodes has been already used. We use stabilizationPrice in the formula + // below so this should not be a problem. // How well the money is spent. priceSubScore := (totalNodePrice + stabilizationPrice) / (totalPodPrice + stabilizationPrice)