diff options
author | Jon Bratseth <bratseth@verizonmedia.com> | 2020-04-03 16:21:51 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@verizonmedia.com> | 2020-04-03 16:21:51 +0200 |
commit | bf800832833c72531465b1c877a787e91a6169b7 (patch) | |
tree | df15e65a3075db876ed7a72598d18453ccea914b | |
parent | 397ec35628315bb4a6a297981d4cdd6e755afaf8 (diff) |
Validate that we don't attempt to scale bandwith
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java index 6a2a8b218a0..ad6eebe1ca5 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/NodesSpecification.java @@ -63,9 +63,14 @@ public class NodesSpecification { if (max.smallerThan(min)) throw new IllegalArgumentException("Min resources must be larger or equal to max resources, but " + max + " is smaller than " + min); + + // Non-scaled resources must be equal if ( ! min.nodeResources().justNonNumbers().equals(max.nodeResources().justNonNumbers())) throw new IllegalArgumentException("Min and max resources must have the same non-numeric settings, but " + "min is " + min + " and max " + max); + if (min.nodeResources().bandwidthGbps() != max.nodeResources().bandwidthGbps()) + throw new IllegalArgumentException("Min and max resources must have the same bandwith, but " + + "min is " + min + " and max " + max); this.min = min; this.max = max; |