diff options
author | Martin Polden <mpolden@mpolden.no> | 2020-04-03 11:51:33 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2020-04-06 11:00:35 +0200 |
commit | 146041e8c794490e0b9a4e72b8b0540a9bf7611b (patch) | |
tree | f9a80c7472a79f9f5c82ac54c6a0f5256f4e0d0d /config-model/src/main | |
parent | cb28efe6ea469089913e277d70d9ed16c55f00a3 (diff) |
Remove unused allocation logic for unspecified nodes
Diffstat (limited to 'config-model/src/main')
-rw-r--r-- | config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java | 1 | ||||
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java | 23 |
2 files changed, 2 insertions, 22 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 c2f1e399e08..4c9e9489c63 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 @@ -62,7 +62,6 @@ public class TestProperties implements ModelContext.Properties { @Override public Optional<TlsSecrets> tlsSecrets() { return endpointCertificateSecrets.map(TlsSecrets::new); } @Override public double defaultTermwiseLimit() { return defaultTermwiseLimit; } @Override public boolean useBucketSpaceMetric() { return true; } - @Override public boolean useDedicatedNodesWhenUnspecified() { return true; } @Override public Optional<AthenzDomain> athenzDomain() { return Optional.ofNullable(athenzDomain); } public TestProperties setDefaultTermwiseLimit(double limit) { 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 06707786136..4bd9f5fa8b0 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 @@ -573,7 +573,7 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> { private void addNodesFromXml(ApplicationContainerCluster cluster, Element containerElement, ConfigModelContext context) { Element nodesElement = XML.getChild(containerElement, "nodes"); if (nodesElement == null) { - cluster.addContainers(allocateWithoutNodesTag(cluster, containerElement, context)); + cluster.addContainers(allocateWithoutNodesTag(cluster, context)); } else { List<ApplicationContainer> nodes = createNodes(cluster, nodesElement, context); @@ -651,29 +651,10 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> { } /** Allocate a container cluster without a nodes tag */ - private List<ApplicationContainer> allocateWithoutNodesTag(ApplicationContainerCluster cluster, Element containerElement, ConfigModelContext context) { + private List<ApplicationContainer> allocateWithoutNodesTag(ApplicationContainerCluster cluster, ConfigModelContext context) { DeployState deployState = context.getDeployState(); HostSystem hostSystem = cluster.hostSystem(); if (deployState.isHosted()) { - // TODO(mpolden): The old way of allocating. Remove when 7.198 is the oldest model in production and the - // feature flag is set to true in all zones. - if (!context.properties().useDedicatedNodesWhenUnspecified()) { - Optional<HostResource> singleContentHost = getHostResourceFromContentClusters(cluster, containerElement, context); - if (singleContentHost.isPresent()) { // there is a content cluster; put the container on its first node - return singleHostContainerCluster(cluster, singleContentHost.get(), context); - } - else { // request 1 node - ClusterSpec clusterSpec = ClusterSpec.request(ClusterSpec.Type.container, ClusterSpec.Id.from(cluster.getName())) - .vespaVersion(deployState.getWantedNodeVespaVersion()) - .dockerImageRepo(deployState.getWantedDockerImageRepo()) - .build(); - Capacity capacity = Capacity.from(new ClusterResources(1, 1, NodeResources.unspecified), - false, - ! deployState.getProperties().isBootstrap()); - HostResource host = hostSystem.allocateHosts(clusterSpec, capacity, log).keySet().iterator().next(); - return singleHostContainerCluster(cluster, host, context); - } - } // request just enough nodes to satisfy environment capacity requirement ClusterSpec clusterSpec = ClusterSpec.request(ClusterSpec.Type.container, ClusterSpec.Id.from(cluster.getName())) |