summaryrefslogtreecommitdiffstats
path: root/clustercontroller-apps/src/main
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@verizonmedia.com>2021-01-27 11:14:53 +0100
committerTor Brede Vekterli <vekterli@verizonmedia.com>2021-01-27 16:22:27 +0100
commit0afcd9167204aaf43ddef0c4160df877dd3f0f44 (patch)
treee067ca5102975108081a0190d7082b865853be02 /clustercontroller-apps/src/main
parent1979ae27956fc628eac97bbe7a285921a0085ef3 (diff)
Add cluster feed block support to cluster controller
Will push out a new cluster state bundle indicating cluster feed blocked if one or more nodes in the cluster has one or more resources exhausted. Similarly, a new state will be pushed out once no nodes have resources exhausted any more. The feed block description currently contains up to 3 separate exhausted resources, possibly across multiple nodes. A cluster-level event is emitted for both the block and unblock edges. No hysteresis is present yet, so if a node is oscillating around a block-limit, so will the cluster state.
Diffstat (limited to 'clustercontroller-apps/src/main')
-rw-r--r--clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java b/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java
index ad65435c770..9f439cbd992 100644
--- a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java
+++ b/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java
@@ -11,6 +11,7 @@ import com.yahoo.vespa.config.content.StorDistributionConfig;
import com.yahoo.cloud.config.ZookeepersConfig;
import java.time.Duration;
+import java.util.Map;
/**
* When the cluster controller is reconfigured, a new instance of this is created, which will propagate configured
@@ -75,6 +76,8 @@ public class ClusterControllerClusterConfigurer {
options.clusterHasGlobalDocumentTypes = config.cluster_has_global_document_types();
options.minMergeCompletionRatio = config.min_merge_completion_ratio();
options.enableTwoPhaseClusterStateActivation = config.enable_two_phase_cluster_state_transitions();
+ options.clusterFeedBlockEnabled = config.enable_cluster_feed_block();
+ options.clusterFeedBlockLimit = Map.copyOf(config.cluster_feed_block_limit());
}
private void configure(SlobroksConfig config) {