diff options
Diffstat (limited to 'controller-server')
4 files changed, 1 insertions, 98 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/ControllerMaintenance.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/ControllerMaintenance.java index 795f14bbde1..f7368aab143 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/ControllerMaintenance.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/ControllerMaintenance.java @@ -1,8 +1,8 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.controller.maintenance; -import com.yahoo.component.annotation.Inject; import com.yahoo.component.AbstractComponent; +import com.yahoo.component.annotation.Inject; import com.yahoo.concurrent.maintenance.Maintainer; import com.yahoo.config.provision.SystemName; import com.yahoo.config.provision.zone.ZoneApi; @@ -60,7 +60,6 @@ public class ControllerMaintenance extends AbstractComponent { maintainers.add(new CostReportMaintainer(controller, intervals.costReportMaintainer, controller.serviceRegistry().costReportConsumer())); maintainers.add(new ResourceMeterMaintainer(controller, intervals.resourceMeterMaintainer, metric, controller.serviceRegistry().meteringService())); maintainers.add(new ResourceTagMaintainer(controller, intervals.resourceTagMaintainer, controller.serviceRegistry().resourceTagger())); - maintainers.add(new SystemRoutingPolicyMaintainer(controller, intervals.systemRoutingPolicyMaintainer)); maintainers.add(new ApplicationMetaDataGarbageCollector(controller, intervals.applicationMetaDataGarbageCollector)); maintainers.add(new ArtifactExpirer(controller, intervals.containerImageExpirer)); maintainers.add(new HostInfoUpdater(controller, intervals.hostInfoUpdater)); @@ -117,9 +116,7 @@ public class ControllerMaintenance extends AbstractComponent { private final Duration nameServiceDispatcher; private final Duration costReportMaintainer; private final Duration resourceMeterMaintainer; - private final Duration cloudEventReporter; private final Duration resourceTagMaintainer; - private final Duration systemRoutingPolicyMaintainer; private final Duration applicationMetaDataGarbageCollector; private final Duration containerImageExpirer; private final Duration hostInfoUpdater; @@ -152,9 +149,7 @@ public class ControllerMaintenance extends AbstractComponent { this.nameServiceDispatcher = duration(10, SECONDS); this.costReportMaintainer = duration(2, HOURS); this.resourceMeterMaintainer = duration(3, MINUTES); - this.cloudEventReporter = duration(30, MINUTES); this.resourceTagMaintainer = duration(30, MINUTES); - this.systemRoutingPolicyMaintainer = duration(15, MINUTES); this.applicationMetaDataGarbageCollector = duration(12, HOURS); this.containerImageExpirer = duration(12, HOURS); this.hostInfoUpdater = duration(12, HOURS); diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/SystemRoutingPolicyMaintainer.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/SystemRoutingPolicyMaintainer.java deleted file mode 100644 index 5acb21917eb..00000000000 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/SystemRoutingPolicyMaintainer.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.hosted.controller.maintenance; - -import com.yahoo.config.application.api.DeploymentSpec; -import com.yahoo.vespa.hosted.controller.Controller; -import com.yahoo.vespa.hosted.controller.api.identifiers.DeploymentId; -import com.yahoo.vespa.hosted.controller.application.SystemApplication; -import com.yahoo.vespa.hosted.controller.routing.RoutingPolicy; - -import java.time.Duration; - -/** - * This maintains {@link RoutingPolicy}'s for {@link SystemApplication}s. In contrast to regular applications, this - * refreshes policies at an interval, not on deployment. - * - * @author mpolden - */ -public class SystemRoutingPolicyMaintainer extends ControllerMaintainer { - - public SystemRoutingPolicyMaintainer(Controller controller, Duration interval) { - super(controller, interval); - } - - @Override - protected double maintain() { - for (var zone : controller().zoneRegistry().zones().reachable().ids()) { - for (var application : SystemApplication.values()) { - if (!application.hasEndpoint()) continue; - DeploymentId deployment = new DeploymentId(application.id(), zone); - controller().routing().of(deployment).configure(DeploymentSpec.empty); - } - } - return 1.0; - } - -} diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/SystemRoutingPolicyMaintainerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/SystemRoutingPolicyMaintainerTest.java deleted file mode 100644 index 8b2bfe8ee95..00000000000 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/SystemRoutingPolicyMaintainerTest.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.hosted.controller.maintenance; - -import com.yahoo.config.provision.ClusterSpec; -import com.yahoo.config.provision.HostName; -import com.yahoo.config.provision.zone.ZoneId; -import com.yahoo.vespa.hosted.controller.ControllerTester; -import com.yahoo.vespa.hosted.controller.api.integration.configserver.LoadBalancer; -import com.yahoo.vespa.hosted.controller.api.integration.dns.Record; -import com.yahoo.vespa.hosted.controller.application.SystemApplication; -import com.yahoo.vespa.hosted.controller.integration.ZoneApiMock; -import org.junit.Test; - -import java.time.Duration; -import java.util.List; -import java.util.Optional; -import java.util.Set; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertSame; - -/** - * @author mpolden - */ -public class SystemRoutingPolicyMaintainerTest { - - @Test - public void maintain() { - var tester = new ControllerTester(); - var updater = new SystemRoutingPolicyMaintainer(tester.controller(), Duration.ofDays(1)); - var dispatcher = new NameServiceDispatcher(tester.controller(), Duration.ofSeconds(Integer.MAX_VALUE)); - - var zone = ZoneId.from("prod", "us-west-1"); - tester.zoneRegistry().exclusiveRoutingIn(ZoneApiMock.from(zone)); - tester.configServer().putLoadBalancers(zone, List.of(new LoadBalancer("lb1", - SystemApplication.configServer.id(), - ClusterSpec.Id.from("config"), - Optional.of(HostName.of("lb1.example.com")), - LoadBalancer.State.active, - Optional.of("dns-zone-1")))); - - // Record is created - updater.run(); - dispatcher.run(); - Set<Record> records = tester.nameService().records(); - assertEquals(1, records.size()); - Record record = records.iterator().next(); - assertSame(Record.Type.CNAME, record.type()); - assertEquals("cfg.prod.us-west-1.test.vip", record.name().asString()); - assertEquals("lb1.example.com.", record.data().asString()); - } - -} diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/controller/responses/maintenance.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/controller/responses/maintenance.json index 7110cbbd738..be28d88abaa 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/controller/responses/maintenance.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/controller/responses/maintenance.json @@ -85,9 +85,6 @@ "name": "RetriggerMaintainer" }, { - "name": "SystemRoutingPolicyMaintainer" - }, - { "name": "SystemUpgrader" }, { |