From e406f4d3dbc4e9a39ced11124754a33e3df54875 Mon Sep 17 00:00:00 2001 From: Jon Marius Venstad Date: Tue, 23 Feb 2021 16:27:32 +0100 Subject: Avoid doing the same thing twice (this is overridden when adding to cluster) --- .../com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java | 2 +- .../java/com/yahoo/vespa/model/content/cluster/ContentCluster.java | 4 +--- .../main/java/com/yahoo/vespa/serviceview/bindings/ServicePort.java | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java index 784e5e77eb5..01bdfa34bc1 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java @@ -425,7 +425,7 @@ public class ContainerModelBuilder extends ConfigModelBuilder { } private static void addHostedImplicitHttpIfNotPresent(ApplicationContainerCluster cluster) { - if(cluster.getHttp() == null) { + if (cluster.getHttp() == null) { cluster.setHttp(new Http(new FilterChains(cluster))); } JettyHttpServer httpServer = cluster.getHttp().getHttpServer().orElse(null); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java index 6e09ed4fe5e..0fd7c55147f 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/cluster/ContentCluster.java @@ -436,9 +436,7 @@ public class ContentCluster extends AbstractConfigProducer implements new ClusterControllerContainer(clusterControllers, index, multitenant, deployState); clusterControllerContainer.setHostResource(host); clusterControllerContainer.initService(deployState.getDeployLogger()); - clusterControllerContainer.setProp("clustertype", "admin") - .setProp("clustername", clusterControllers.getName()) - .setProp("index", String.valueOf(index)); + clusterControllerContainer.setProp("clustertype", "admin"); containers.add(clusterControllerContainer); ++index; } diff --git a/serviceview/src/main/java/com/yahoo/vespa/serviceview/bindings/ServicePort.java b/serviceview/src/main/java/com/yahoo/vespa/serviceview/bindings/ServicePort.java index 6fd2f22528a..98db96a902a 100644 --- a/serviceview/src/main/java/com/yahoo/vespa/serviceview/bindings/ServicePort.java +++ b/serviceview/src/main/java/com/yahoo/vespa/serviceview/bindings/ServicePort.java @@ -10,7 +10,7 @@ import com.google.common.base.Splitter; * View of {@link com.yahoo.cloud.config.ModelConfig.Hosts.Services.Ports}. * * @author mortent - * @author Steinar Knutsen + * @author Steinar Knutsen */ @JsonIgnoreProperties(value = { "splitOnSpace" }, ignoreUnknown = true) public class ServicePort { -- cgit v1.2.3 From 5d747f07d7332b6698849af802089e97ab9a65c4 Mon Sep 17 00:00:00 2001 From: Jon Marius Venstad Date: Tue, 23 Feb 2021 16:29:45 +0100 Subject: Simplify—cannot have multiple CCs, all with index 0, on same host anyway MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vespa/model/admin/clustercontroller/ClusterControllerContainer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainer.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainer.java index 4b39c67cda4..861982cc2ea 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainer.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainer.java @@ -79,7 +79,7 @@ public class ClusterControllerContainer extends Container implements @Override public boolean requiresWantedPort() { - return index() == 0; + return false; } @Override -- cgit v1.2.3 From 2fd40506799e3dcc6bc46fda49e3e4c2652321c8 Mon Sep 17 00:00:00 2001 From: Jon Marius Venstad Date: Tue, 23 Feb 2021 16:30:07 +0100 Subject: Run migrator all the time in staging as well --- .../maintenance/DedicatedClusterControllerClusterMigrator.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/DedicatedClusterControllerClusterMigrator.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/DedicatedClusterControllerClusterMigrator.java index 6ae949daa69..3b1ff1f0ef8 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/DedicatedClusterControllerClusterMigrator.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/DedicatedClusterControllerClusterMigrator.java @@ -3,6 +3,7 @@ package com.yahoo.vespa.hosted.provision.maintenance; import com.yahoo.config.provision.ApplicationId; import com.yahoo.config.provision.Deployer; +import com.yahoo.config.provision.Environment; import com.yahoo.jdisc.Metric; import com.yahoo.vespa.flags.BooleanFlag; import com.yahoo.vespa.flags.FetchVector; @@ -44,6 +45,7 @@ public class DedicatedClusterControllerClusterMigrator extends ApplicationMainta ZonedDateTime date = ZonedDateTime.ofInstant(clock().instant(), java.time.ZoneId.of("Europe/Oslo")); if ( ! nodeRepository().zone().system().isCd() + && nodeRepository().zone().environment() != Environment.staging && (List.of(SATURDAY, SUNDAY).contains(date.getDayOfWeek()) || date.getHour() < 8 || 12 < date.getHour())) return Set.of(); -- cgit v1.2.3