From 1b6288fb42ab3ffaabfe9ffed4111e83cade121f Mon Sep 17 00:00:00 2001 From: bjormel Date: Thu, 2 Nov 2023 14:40:26 +0000 Subject: Don't autoscale single node clusters --- .../com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'node-repository/src/test') diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java index 37e1390a673..1fb137eb088 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java @@ -843,9 +843,7 @@ public class AutoscalingTest { .build(); fixture.tester().clock().advance(Duration.ofDays(2)); fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0), 200); - fixture.tester().assertResources("Scale only to a single node and group since this is dev", - 1, 1, 0.1, 22.9, 105.2, - fixture.autoscale()); + assertEquals("Don't autoscale: Autoscaling is not enabled for single node clusters", fixture.autoscale().toString()); } /** Same setup as test_autoscaling_in_dev(), just with required = true */ -- cgit v1.2.3 From 207aa59a912e1b3665dc0bb4f1c031356d41efbc Mon Sep 17 00:00:00 2001 From: bjormel Date: Thu, 2 Nov 2023 14:44:01 +0000 Subject: Clarification of message --- .../java/com/yahoo/vespa/hosted/provision/autoscale/Autoscaler.java | 2 +- .../com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'node-repository/src/test') 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 8adfebb6284..66f2e13db09 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 @@ -79,7 +79,7 @@ public class Autoscaler { return Autoscaling.dontScale(Status.insufficient, "No allocations are possible within configured limits", model); if (target.get().nodes() == 1 && model.current().nodes() == 1) - return Autoscaling.dontScale(Status.unavailable, "Autoscaling is not enabled for single node clusters", model); + return Autoscaling.dontScale(Status.unavailable, "Autoscaling of resources is not enabled for single node clusters", model); if (! worthRescaling(model.current().realResources(), target.get().realResources())) { if (target.get().fulfilment() < 0.9999999) diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java index 1fb137eb088..cb020a5b3ee 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java @@ -843,7 +843,7 @@ public class AutoscalingTest { .build(); fixture.tester().clock().advance(Duration.ofDays(2)); fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0), 200); - assertEquals("Don't autoscale: Autoscaling is not enabled for single node clusters", fixture.autoscale().toString()); + assertEquals("Don't autoscale: Autoscaling of resources is not enabled for single node clusters", fixture.autoscale().toString()); } /** Same setup as test_autoscaling_in_dev(), just with required = true */ -- cgit v1.2.3 From c31fd7fea8c5c2b5a2ce02b07bdf68d077d8c089 Mon Sep 17 00:00:00 2001 From: Bjørn Meland Date: Fri, 3 Nov 2023 10:11:30 +0000 Subject: Update node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java Co-authored-by: Jon Bratseth --- .../com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'node-repository/src/test') diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java index cb020a5b3ee..d4d34ab66e5 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/AutoscalingTest.java @@ -843,7 +843,7 @@ public class AutoscalingTest { .build(); fixture.tester().clock().advance(Duration.ofDays(2)); fixture.loader().applyLoad(new Load(1.0, 1.0, 1.0), 200); - assertEquals("Don't autoscale: Autoscaling of resources is not enabled for single node clusters", fixture.autoscale().toString()); + assertEquals("Don't autoscale: Autoscaling is disabled in single node clusters", fixture.autoscale().toString()); } /** Same setup as test_autoscaling_in_dev(), just with required = true */ -- cgit v1.2.3