summaryrefslogtreecommitdiffstats
path: root/node-repository
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2021-10-27 09:35:25 +0200
committerHarald Musum <musum@yahooinc.com>2021-10-27 09:35:25 +0200
commitc4289de0284c57cb89660c1dddb96abc0a56d096 (patch)
tree1edd64c8dc5870dcca208a0975f8367bf680afdf /node-repository
parent71ee71009627591dd4f5d19db030df5d109c9043 (diff)
Avoid running Rebalancer in cd systems
Rebalancer will make asserts on number of nodes while running tests fail
Diffstat (limited to 'node-repository')
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/Rebalancer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/Rebalancer.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/Rebalancer.java
index bbe2a8e3e1d..6a18003db62 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/Rebalancer.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/Rebalancer.java
@@ -1,4 +1,4 @@
-// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.provision.maintenance;
import com.yahoo.config.provision.Deployer;
@@ -39,6 +39,7 @@ public class Rebalancer extends NodeMover<Rebalancer.Move> {
if (nodeRepository().zone().getCloud().dynamicProvisioning()) return 1.0; // Rebalancing not necessary
if (nodeRepository().zone().environment().isTest()) return 1.0; // Short lived deployments; no need to rebalance
+ if (nodeRepository().zone().system().isCd()) return 1.0; // CD tests assert on # of nodes, avoid rebalnacing as it make tests unstable
// Work with an unlocked snapshot as this can take a long time and full consistency is not needed
NodesAndHosts<NodeList> allNodes = NodesAndHosts.create(nodeRepository().nodes().list());