diff options
13 files changed, 46 insertions, 89 deletions
diff --git a/config-model-api/abi-spec.json b/config-model-api/abi-spec.json index 63313ecabe1..9a975f1b727 100644 --- a/config-model-api/abi-spec.json +++ b/config-model-api/abi-spec.json @@ -1145,12 +1145,14 @@ ], "methods" : [ "public static com.yahoo.config.model.api.EndpointCertificateMetadata$Provider[] values()", - "public static com.yahoo.config.model.api.EndpointCertificateMetadata$Provider valueOf(java.lang.String)" + "public static com.yahoo.config.model.api.EndpointCertificateMetadata$Provider valueOf(java.lang.String)", + "public boolean acme()" ], "fields" : [ "public static final enum com.yahoo.config.model.api.EndpointCertificateMetadata$Provider digicert", "public static final enum com.yahoo.config.model.api.EndpointCertificateMetadata$Provider globalsign", - "public static final enum com.yahoo.config.model.api.EndpointCertificateMetadata$Provider zerossl" + "public static final enum com.yahoo.config.model.api.EndpointCertificateMetadata$Provider zerossl", + "public static final enum com.yahoo.config.model.api.EndpointCertificateMetadata$Provider letsencrypt" ] }, "com.yahoo.config.model.api.EndpointCertificateMetadata" : { diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/EndpointCertificateMetadata.java b/config-model-api/src/main/java/com/yahoo/config/model/api/EndpointCertificateMetadata.java index 591677f6677..eaed57e9154 100644 --- a/config-model-api/src/main/java/com/yahoo/config/model/api/EndpointCertificateMetadata.java +++ b/config-model-api/src/main/java/com/yahoo/config/model/api/EndpointCertificateMetadata.java @@ -5,7 +5,23 @@ import java.util.Objects; public class EndpointCertificateMetadata { - public enum Provider { digicert, globalsign, zerossl } + public enum Provider { + + digicert(false), + globalsign(false), + zerossl(true), + letsencrypt(true); + + private final boolean acme; + + Provider(boolean acme) { + this.acme = acme; + } + + public boolean acme() { return acme; } + + } + private final String keyName; private final String certName; private final int version; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/SearchChains.java b/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/SearchChains.java index 3f1de25f71f..3cf887a5928 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/SearchChains.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/SearchChains.java @@ -41,9 +41,17 @@ public class SearchChains extends Chains<SearchChain> { private void setSearchClusterForLocalProvider(Map<String, ? extends SearchCluster> clusterIndexByName) { for (LocalProvider provider : localProviders()) { - SearchCluster cluster = clusterIndexByName.get(provider.getClusterName()); - if (cluster == null) - throw new IllegalArgumentException("No searchable content cluster with id '" + provider.getClusterName() + "'"); + String clusterName = provider.getClusterName(); + SearchCluster cluster = clusterIndexByName.get(clusterName); + if (cluster == null) { + if (clusterName.contains(".")) { // Is there a super cluster ... + String prefix = clusterName.substring(0, clusterName.indexOf('.')); + cluster = clusterIndexByName.get(prefix); + } + if (cluster == null) { + throw new IllegalArgumentException("No searchable content cluster with id '" + provider.getClusterName() + "'"); + } + } provider.setSearchCluster(cluster); } } diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/EndpointCertificateMetadataSerializer.java b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/EndpointCertificateMetadataSerializer.java index d3c026dbc0d..1b0b41a8d12 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/EndpointCertificateMetadataSerializer.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/tenant/EndpointCertificateMetadataSerializer.java @@ -9,6 +9,7 @@ import com.yahoo.slime.Type; import static com.yahoo.config.model.api.EndpointCertificateMetadata.Provider.digicert; import static com.yahoo.config.model.api.EndpointCertificateMetadata.Provider.globalsign; +import static com.yahoo.config.model.api.EndpointCertificateMetadata.Provider.letsencrypt; import static com.yahoo.config.model.api.EndpointCertificateMetadata.Provider.zerossl; /** @@ -53,6 +54,7 @@ public class EndpointCertificateMetadataSerializer { case "digicert" -> digicert; case "globalsign" -> globalsign; case "zerossl" -> zerossl; + case "letsencrypt" -> letsencrypt; default -> digicert; }; } @@ -62,6 +64,8 @@ public class EndpointCertificateMetadataSerializer { case digicert -> "digicert"; case globalsign -> "globalsign"; case zerossl -> "zerossl"; + case letsencrypt -> "letsencrypt"; }; } + } diff --git a/dependency-versions/pom.xml b/dependency-versions/pom.xml index 6ef0e26bade..9c757e666a2 100644 --- a/dependency-versions/pom.xml +++ b/dependency-versions/pom.xml @@ -166,7 +166,7 @@ <maven-deploy-plugin.vespa.version>3.1.1</maven-deploy-plugin.vespa.version> <maven-enforcer-plugin.vespa.version>3.4.1</maven-enforcer-plugin.vespa.version> <maven-failsafe-plugin.vespa.version>3.2.5</maven-failsafe-plugin.vespa.version> - <maven-gpg-plugin.vespa.version>3.2.0</maven-gpg-plugin.vespa.version> + <maven-gpg-plugin.vespa.version>3.2.1</maven-gpg-plugin.vespa.version> <maven-install-plugin.vespa.version>3.1.1</maven-install-plugin.vespa.version> <maven-jar-plugin.vespa.version>3.3.0</maven-jar-plugin.vespa.version> <maven-javadoc-plugin.vespa.version>3.6.3</maven-javadoc-plugin.vespa.version> diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications/Cluster.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications/Cluster.java index 4134ea337ab..8646121bd4b 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications/Cluster.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/applications/Cluster.java @@ -33,7 +33,6 @@ public class Cluster { private final ClusterResources min, max; private final IntRange groupSize; private final boolean required; - private final Autoscaling suggested; private final List<Autoscaling> suggestions; private final Autoscaling target; private final ClusterInfo clusterInfo; @@ -48,7 +47,6 @@ public class Cluster { ClusterResources maxResources, IntRange groupSize, boolean required, - Autoscaling suggested, List<Autoscaling> suggestions, Autoscaling target, ClusterInfo clusterInfo, @@ -60,7 +58,6 @@ public class Cluster { this.max = Objects.requireNonNull(maxResources); this.groupSize = Objects.requireNonNull(groupSize); this.required = required; - this.suggested = Objects.requireNonNull(suggested); this.suggestions = Objects.requireNonNull(suggestions); Objects.requireNonNull(target); if (target.resources().isPresent() && ! target.resources().get().isWithin(minResources, maxResources)) @@ -100,12 +97,6 @@ public class Cluster { public Autoscaling target() { return target; } /** - * The suggested resources, which may or may not be within the min and max limits, - * or empty if there is currently no recorded suggestion. - */ - public Autoscaling suggested() { return suggested; } - - /** * The list of suggested resources, which may or may not be within the min and max limits, * or empty if there is currently no recorded suggestion. * List is sorted by preference @@ -143,23 +134,19 @@ public class Cluster { public Cluster withConfiguration(boolean exclusive, Capacity capacity) { return new Cluster(id, exclusive, capacity.minResources(), capacity.maxResources(), capacity.groupSize(), capacity.isRequired(), - suggested, suggestions, target, capacity.clusterInfo(), bcpGroupInfo, scalingEvents); - } - - public Cluster withSuggested(Autoscaling suggested) { - return new Cluster(id, exclusive, min, max, groupSize, required, suggested, suggestions, target, clusterInfo, bcpGroupInfo, scalingEvents); + suggestions, target, capacity.clusterInfo(), bcpGroupInfo, scalingEvents); } public Cluster withSuggestions(List<Autoscaling> suggestions) { - return new Cluster(id, exclusive, min, max, groupSize, required, suggested, suggestions, target, clusterInfo, bcpGroupInfo, scalingEvents); + return new Cluster(id, exclusive, min, max, groupSize, required, suggestions, target, clusterInfo, bcpGroupInfo, scalingEvents); } public Cluster withTarget(Autoscaling target) { - return new Cluster(id, exclusive, min, max, groupSize, required, suggested, suggestions, target, clusterInfo, bcpGroupInfo, scalingEvents); + return new Cluster(id, exclusive, min, max, groupSize, required, suggestions, target, clusterInfo, bcpGroupInfo, scalingEvents); } public Cluster with(BcpGroupInfo bcpGroupInfo) { - return new Cluster(id, exclusive, min, max, groupSize, required, suggested, suggestions, target, clusterInfo, bcpGroupInfo, scalingEvents); + return new Cluster(id, exclusive, min, max, groupSize, required, suggestions, target, clusterInfo, bcpGroupInfo, scalingEvents); } /** Add or update (based on "at" time) a scaling event */ @@ -173,7 +160,7 @@ public class Cluster { scalingEvents.add(scalingEvent); prune(scalingEvents); - return new Cluster(id, exclusive, min, max, groupSize, required, suggested, suggestions, target, clusterInfo, bcpGroupInfo, scalingEvents); + return new Cluster(id, exclusive, min, max, groupSize, required, suggestions, target, clusterInfo, bcpGroupInfo, scalingEvents); } @Override @@ -205,7 +192,7 @@ public class Cluster { public static Cluster create(ClusterSpec.Id id, boolean exclusive, Capacity requested) { return new Cluster(id, exclusive, requested.minResources(), requested.maxResources(), requested.groupSize(), requested.isRequired(), - Autoscaling.empty(), List.of(), Autoscaling.empty(), requested.clusterInfo(), BcpGroupInfo.empty(), List.of()); + List.of(), Autoscaling.empty(), requested.clusterInfo(), BcpGroupInfo.empty(), List.of()); } /** The predicted time it will take to rescale this cluster. */ diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainer.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainer.java index fa1be83dbcf..07cfce79f4b 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainer.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/ScalingSuggestionsMaintainer.java @@ -98,8 +98,7 @@ public class ScalingSuggestionsMaintainer extends NodeRepositoryMaintainer { Mutex lock) { Optional<Cluster> cluster = application.cluster(clusterId); if (cluster.isEmpty()) return; - applications().put(application.with(cluster.get().withSuggestions(suggestions) - .withSuggested(suggestions.stream().findFirst().orElse(Autoscaling.empty()))), lock); + applications().put(application.with(cluster.get().withSuggestions(suggestions)), lock); } private boolean isHigher(ClusterResources r1, ClusterResources r2) { diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializer.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializer.java index 2dea70825ee..1315207efb8 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializer.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializer.java @@ -141,8 +141,8 @@ public class ApplicationSerializer { toSlime(cluster.maxResources(), clusterObject.setObject(maxResourcesKey)); toSlime(cluster.groupSize(), clusterObject.setObject(groupSizeKey)); clusterObject.setBool(requiredKey, cluster.required()); - // TODO(olaa): Remove 'suggested' once API clients migrate to suggestion list - toSlime(cluster.suggested(), clusterObject.setObject(suggestedKey)); + // TODO(olaa): Remove 'suggested' once all configservers have stopped reading entry + toSlime(Autoscaling.empty(), clusterObject.setObject(suggestedKey)); toSlime(cluster.suggestions(), clusterObject.setArray(suggestionsKey)); toSlime(cluster.target(), clusterObject.setObject(targetKey)); if (! cluster.clusterInfo().isEmpty()) @@ -159,7 +159,6 @@ public class ApplicationSerializer { clusterResourcesFromSlime(clusterObject.field(maxResourcesKey)), intRangeFromSlime(clusterObject.field(groupSizeKey)), clusterObject.field(requiredKey).asBool(), - autoscalingFromSlime(clusterObject.field(suggestedKey)), suggestionsFromSlime(clusterObject.field(suggestionsKey)), autoscalingFromSlime(clusterObject.field(targetKey)), clusterInfoFromSlime(clusterObject.field(clusterInfoKey)), diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/ApplicationSerializer.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/ApplicationSerializer.java index 0285e72a8a4..2bba0ee56be 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/ApplicationSerializer.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/ApplicationSerializer.java @@ -79,9 +79,7 @@ public class ApplicationSerializer { toSlime(cluster.groupSize(), clusterObject.setObject("groupSize")); toSlime(currentResources, clusterObject.setObject("current")); if (cluster.shouldSuggestResources(currentResources)) { - toSlime(cluster.suggested(), clusterObject.setObject("suggested")); toSlime(cluster.suggestions(), clusterObject.setArray("suggestions")); - } toSlime(cluster.target(), clusterObject.setObject("target")); scalingEventsToSlime(cluster.scalingEvents(), clusterObject.setArray("scalingEvents")); diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockNodeRepository.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockNodeRepository.java index e7c9d1079fb..9d9771b3b0f 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockNodeRepository.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockNodeRepository.java @@ -225,14 +225,6 @@ public class MockNodeRepository extends NodeRepository { null), app1Id, provisioner); Application app1 = applications().get(app1Id).get(); Cluster cluster1 = app1.cluster(cluster1Id.id()).get(); - cluster1 = cluster1.withSuggested(new Autoscaling(Autoscaling.Status.unavailable, - "", - Optional.of(new ClusterResources(6, 2, - new NodeResources(3, 20, 100, 1))), - clock().instant(), - Load.zero(), - Load.zero(), - Autoscaling.Metrics.zero())); cluster1 = cluster1.withSuggestions(List.of(new Autoscaling(Autoscaling.Status.unavailable, "", Optional.of(new ClusterResources(6, 2, diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializerTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializerTest.java index 90af6dca090..f25d4cc3c30 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializerTest.java +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/persistence/ApplicationSerializerTest.java @@ -40,7 +40,6 @@ public class ApplicationSerializerTest { new ClusterResources(12, 6, new NodeResources(3, 6, 21, 24)), IntRange.empty(), true, - Autoscaling.empty(), List.of(), Autoscaling.empty(), ClusterInfo.empty(), @@ -53,14 +52,6 @@ public class ApplicationSerializerTest { new ClusterResources(14, 7, new NodeResources(3, 6, 21, 24)), IntRange.of(3, 5), false, - new Autoscaling(Autoscaling.Status.unavailable, - "", - Optional.of(new ClusterResources(20, 10, - new NodeResources(0.5, 4, 14, 16))), - Instant.ofEpochMilli(1234L), - new Load(0.1, 0.2, 0.3, 0.4, 0.5), - new Load(0.4, 0.5, 0.6, 0.7, 0.8), - new Autoscaling.Metrics(0.7, 0.8, 0.9)), List.of(new Autoscaling(Autoscaling.Status.unavailable, "", Optional.of(new ClusterResources(20, 10, @@ -106,7 +97,6 @@ public class ApplicationSerializerTest { assertEquals(originalCluster.maxResources(), serializedCluster.maxResources()); assertEquals(originalCluster.groupSize(), serializedCluster.groupSize()); assertEquals(originalCluster.required(), serializedCluster.required()); - assertEquals(originalCluster.suggested(), serializedCluster.suggested()); assertEquals(originalCluster.suggestions(), serializedCluster.suggestions()); assertEquals(originalCluster.target(), serializedCluster.target()); assertEquals(originalCluster.clusterInfo(), serializedCluster.clusterInfo()); diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/DynamicProvisioningTester.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/DynamicProvisioningTester.java index 6b6ef49fa5d..1f8178dff6a 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/DynamicProvisioningTester.java +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/DynamicProvisioningTester.java @@ -143,7 +143,6 @@ public class DynamicProvisioningTester { cluster.maxResources(), cluster.groupSize(), cluster.required(), - cluster.suggested(), cluster.suggestions(), cluster.target(), cluster.clusterInfo(), diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json index e74e705e1aa..9f73fcd9a46 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/application1.json @@ -45,43 +45,6 @@ "architecture":"x86_64" } }, - "suggested" : { - "status" : "unavailable", - "description" : "", - "resources" : { - "nodes": 6, - "groups": 2, - "resources": { - "vcpu": 3.0, - "memoryGb": 20.0, - "diskGb": 100.0, - "bandwidthGbps": 1.0, - "diskSpeed": "fast", - "storageType": "any", - "architecture": "any" - } - }, - "at" : 123, - "peak" : { - "cpu" : 0.0, - "memory" : 0.0, - "disk" : 0.0, - "gpu": 0.0, - "gpuMemory": 0.0 - }, - "ideal" : { - "cpu" : 0.0, - "memory" : 0.0, - "disk" : 0.0, - "gpu": 0.0, - "gpuMemory": 0.0 - }, - "metrics" : { - "queryRate" : 0.0, - "growthRateHeadroom" : 0.0, - "cpuCostPerQuery" : 0.0 - } - }, "suggestions": [ { "at": 123, |