summaryrefslogtreecommitdiffstats
path: root/node-repository
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2023-01-06 13:11:37 +0100
committerJon Bratseth <bratseth@gmail.com>2023-01-06 13:11:37 +0100
commit9d499d42bcca59c69cb87335a2555e2bbcbdb976 (patch)
treec71f520708e526a21421895961afa2fc1fab8f1b /node-repository
parent7d839355259eca823da9396c1ed15b43f7c98768 (diff)
Separate status message for waiting to scale down
Diffstat (limited to 'node-repository')
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java
index eacafb444b5..53dc0aa7999 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java
@@ -77,8 +77,10 @@ public class Autoscaler {
return Autoscaling.dontScale(Status.insufficient, "No allocations are possible within configured limits", clusterModel);
if (! worthRescaling(currentAllocation.realResources(), bestAllocation.get().realResources())) {
- if (bestAllocation.get().fulfilment() < 1)
+ if (bestAllocation.get().fulfilment() < 0.9999999)
return Autoscaling.dontScale(Status.insufficient, "Configured limits prevents better scaling of this cluster", clusterModel);
+ else if ( ! clusterModel.safeToScaleDown() && clusterModel.idealLoad().any(v -> v < 1.0))
+ return Autoscaling.dontScale(Status.ideal, "Cooling down before considering to scale down", clusterModel);
else
return Autoscaling.dontScale(Status.ideal, "Cluster is ideally scaled", clusterModel);
}