summaryrefslogtreecommitdiffstats
path: root/clustercontroller-apps
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahoo-inc.com>2016-06-17 10:41:33 +0200
committerTor Brede Vekterli <vekterli@yahoo-inc.com>2016-06-17 10:41:33 +0200
commit916e5a5b8a4574bb2d878c5b07c97b1678df81b3 (patch)
treef88615323a5cf12cb08fb6a10977c9d74855dfda /clustercontroller-apps
parent4edde0fd2999b4343cff30deda8c28e64cef6be7 (diff)
Add configurable automatic group up/down feature based on node availability
Available under content cluster tuning tag; feature is currently disabled by default (need prod experience for this first). Also improves handling of nodes removed from config by ensuring these are taken out of the core working cluster state instead of just patched away before each state publish.
Diffstat (limited to 'clustercontroller-apps')
-rw-r--r--clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java1
-rw-r--r--clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurerTest.java7
2 files changed, 7 insertions, 1 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 07b0a68520b..6b02debc182 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
@@ -69,6 +69,7 @@ public class ClusterControllerClusterConfigurer {
options.minTimeBetweenNewSystemStates = config.min_time_between_new_systemstates();
options.maxSlobrokDisconnectGracePeriod = (int) (config.max_slobrok_disconnect_grace_period() * 1000);
options.distributionBits = config.ideal_distribution_bits();
+ options.minNodeRatioPerGroup = config.min_node_ratio_per_group();
}
private void configure(SlobroksConfig config) {
diff --git a/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurerTest.java b/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurerTest.java
index 6cf4f962c9f..79da2574dbc 100644
--- a/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurerTest.java
+++ b/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurerTest.java
@@ -22,7 +22,11 @@ public class ClusterControllerClusterConfigurerTest extends TestCase {
group.nodes.add(node);
distributionConfig.group.add(group);
FleetcontrollerConfig.Builder fleetcontrollerConfig = new FleetcontrollerConfig.Builder();
- fleetcontrollerConfig.cluster_name("storage").index(0).zookeeper_server("zoo");
+ fleetcontrollerConfig
+ .cluster_name("storage")
+ .index(0)
+ .zookeeper_server("zoo")
+ .min_node_ratio_per_group(0.123);
SlobroksConfig.Builder slobroksConfig = new SlobroksConfig.Builder();
SlobroksConfig.Slobrok.Builder slobrok = new SlobroksConfig.Slobrok.Builder();
slobrok.connectionspec("foo");
@@ -47,6 +51,7 @@ public class ClusterControllerClusterConfigurerTest extends TestCase {
metric
);
assertTrue(configurer.getOptions() != null);
+ assertEquals(0.123, configurer.getOptions().minNodeRatioPerGroup, 0.01);
// Oki with no zookeeper if one node
zookeepersConfig.zookeeperserverlist("");