aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/main/java/com')
-rw-r--r--config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java7
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/ClusterControllerConfig.java9
2 files changed, 14 insertions, 2 deletions
diff --git a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
index c2d6adddeed..0cefcc51627 100644
--- a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
+++ b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java
@@ -86,6 +86,7 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
private boolean symmetricPutAndActivateReplicaSelection = false;
private boolean enforceStrictlyIncreasingClusterStateVersions = false;
private boolean launchApplicationAthenzService = false;
+ private boolean distributionConfigFromClusterController = false;
@Override public ModelContext.FeatureFlags featureFlags() { return this; }
@Override public boolean multitenant() { return multitenant; }
@@ -146,6 +147,7 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
@Override public boolean symmetricPutAndActivateReplicaSelection() { return symmetricPutAndActivateReplicaSelection; }
@Override public boolean enforceStrictlyIncreasingClusterStateVersions() { return enforceStrictlyIncreasingClusterStateVersions; }
@Override public boolean launchApplicationAthenzService() { return launchApplicationAthenzService; }
+ @Override public boolean distributionConfigFromClusterController() { return distributionConfigFromClusterController; }
public TestProperties sharedStringRepoNoReclaim(boolean sharedStringRepoNoReclaim) {
this.sharedStringRepoNoReclaim = sharedStringRepoNoReclaim;
@@ -396,6 +398,11 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
return this;
}
+ public TestProperties setDistributionConfigFromClusterController(boolean configFromCc) {
+ this.distributionConfigFromClusterController = configFromCc;
+ return this;
+ }
+
public static class Spec implements ConfigServerSpec {
private final String hostName;
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ClusterControllerConfig.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ClusterControllerConfig.java
index 14a4af67ed7..c6e251c2e1d 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/ClusterControllerConfig.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ClusterControllerConfig.java
@@ -54,7 +54,8 @@ public class ClusterControllerConfig extends AnyConfigProducer implements Fleetc
return new ClusterControllerConfig(ancestor,
clusterName,
tuningConfig,
- resourceLimits);
+ resourceLimits,
+ deployState.featureFlags().distributionConfigFromClusterController());
}
}
@@ -62,15 +63,18 @@ public class ClusterControllerConfig extends AnyConfigProducer implements Fleetc
private final String clusterName;
private final ClusterControllerTuning tuning;
private final ResourceLimits resourceLimits;
+ private final boolean distributionConfigFromClusterController;
private ClusterControllerConfig(TreeConfigProducer<?> parent,
String clusterName,
ClusterControllerTuning tuning,
- ResourceLimits resourceLimits) {
+ ResourceLimits resourceLimits,
+ boolean distributionConfigFromClusterController) {
super(parent, "fleetcontroller");
this.clusterName = clusterName;
this.tuning = tuning;
this.resourceLimits = resourceLimits;
+ this.distributionConfigFromClusterController = distributionConfigFromClusterController;
}
@Override
@@ -86,6 +90,7 @@ public class ClusterControllerConfig extends AnyConfigProducer implements Fleetc
builder.index(0);
builder.cluster_name(clusterName);
builder.fleet_controller_count(getChildren().size());
+ builder.include_distribution_config_in_cluster_state_bundle(distributionConfigFromClusterController);
tuning.initProgressTime.ifPresent(i -> builder.init_progress_time((int) i.getMilliSeconds()));
tuning.transitionTime.ifPresent(t -> builder.storage_transition_time((int) t.getMilliSeconds()));