diff options
author | Jon Bratseth <bratseth@gmail.com> | 2023-01-06 13:11:37 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2023-01-06 13:11:37 +0100 |
commit | 9d499d42bcca59c69cb87335a2555e2bbcbdb976 (patch) | |
tree | c71f520708e526a21421895961afa2fc1fab8f1b /node-repository | |
parent | 7d839355259eca823da9396c1ed15b43f7c98768 (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.java | 4 |
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); } |