diff options
author | Martin Polden <mpolden@mpolden.no> | 2020-07-14 10:58:43 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2020-07-14 10:58:43 +0200 |
commit | cc96c96fc7f6d61c870229dae0f4f91a6809fb37 (patch) | |
tree | db60ed71d99e83fef32aac0dbe6d5cddb0ab77ed /controller-server | |
parent | 002cf5f977e139889cd2890f45fa60a535eee936 (diff) |
Enable weighted-dns-per-region by default
Diffstat (limited to 'controller-server')
2 files changed, 12 insertions, 2 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java index 9e6eb9ca2e1..0d1c655eb01 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java @@ -29,6 +29,7 @@ import com.yahoo.vespa.hosted.controller.api.integration.dns.LatencyAliasTarget; import com.yahoo.vespa.hosted.controller.api.integration.dns.Record; import com.yahoo.vespa.hosted.controller.api.integration.dns.RecordData; import com.yahoo.vespa.hosted.controller.api.integration.dns.RecordName; +import com.yahoo.vespa.hosted.controller.api.integration.dns.WeightedAliasTarget; import com.yahoo.vespa.hosted.controller.application.ApplicationPackage; import com.yahoo.vespa.hosted.controller.application.Deployment; import com.yahoo.vespa.hosted.controller.application.DeploymentMetrics; @@ -822,10 +823,16 @@ public class ControllerTest { context.submit(applicationPackage).deploy(); var expectedRecords = List.of( - // The 'east' global endpoint, pointing to zone 2 with exclusive routing + // The weighted record for zone 2's region + new Record(Record.Type.ALIAS, + RecordName.from("application.tenant.us-east-3-w.vespa.oath.cloud"), + new WeightedAliasTarget(HostName.from("lb-0--tenant:application:default--prod.us-east-3"), + "dns-zone-1", ZoneId.from("prod.us-east-3"), 1).pack()), + + // The 'east' global endpoint, pointing to the weighted record for zone 2's region new Record(Record.Type.ALIAS, RecordName.from("east.application.tenant.global.vespa.oath.cloud"), - new LatencyAliasTarget(HostName.from("lb-0--tenant:application:default--prod.us-east-3"), + new LatencyAliasTarget(HostName.from("application.tenant.us-east-3-w.vespa.oath.cloud"), "dns-zone-1", ZoneId.from("prod.us-east-3")).pack()), // The 'default' global endpoint, pointing to both zones with shared routing, via rotation diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/routing/RoutingPoliciesLegacyTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/routing/RoutingPoliciesLegacyTest.java index d5a50d98c8d..7ade8f31224 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/routing/RoutingPoliciesLegacyTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/routing/RoutingPoliciesLegacyTest.java @@ -14,6 +14,8 @@ import com.yahoo.config.provision.RegionName; import com.yahoo.config.provision.SystemName; import com.yahoo.config.provision.zone.RoutingMethod; import com.yahoo.config.provision.zone.ZoneId; +import com.yahoo.vespa.flags.Flags; +import com.yahoo.vespa.flags.InMemoryFlagSource; import com.yahoo.vespa.hosted.controller.ControllerTester; import com.yahoo.vespa.hosted.controller.Instance; import com.yahoo.vespa.hosted.controller.RoutingController; @@ -652,6 +654,7 @@ public class RoutingPoliciesLegacyTest { public RoutingPoliciesTester(DeploymentTester tester) { this.tester = tester; // Make all zones directly routed + ((InMemoryFlagSource) tester.controllerTester().controller().flagSource()).withBooleanFlag(Flags.WEIGHTED_DNS_PER_REGION.id(), false); tester.controllerTester().zoneRegistry().exclusiveRoutingIn(tester.controllerTester().zoneRegistry().zones().all().zones()); } |