summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2019-11-06 11:30:32 +0100
committerJon Marius Venstad <venstad@gmail.com>2019-11-06 12:08:46 +0100
commit2955168881dda58634cb67084c255dcd6e57e8ec (patch)
tree7bea9765dc29e4d3306336e4e12474a54ff2f484 /controller-server
parent997f322e470c6f5ef67f18d7c6a5ce320891d5b8 (diff)
Use instance part in global endpoints (unless it is "default")
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java1
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/application/EndpointTest.java16
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2-with-patches.json2
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2.json2
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-with-routing-policy.json2
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-without-change-multiple-deployments.json2
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance.json2
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance1-recursive.json2
8 files changed, 18 insertions, 11 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java
index 83d1b5ef803..9a6daf026c3 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java
@@ -145,7 +145,6 @@ public class Endpoint {
}
private static String instancePart(ApplicationId application, ZoneId zone, String separator) {
- if (zone == null) return ""; // Always omit instance for global endpoints
if (application.instance().isDefault()) return ""; // Skip "default"
return application.instance().value() + separator;
}
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/application/EndpointTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/application/EndpointTest.java
index 3e96d2f6972..ea97e3e6c71 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/application/EndpointTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/application/EndpointTest.java
@@ -41,6 +41,10 @@ public class EndpointTest {
"https://cd--a1--t1.global.vespa.oath.cloud:4443/",
Endpoint.of(app1).named(endpointId).on(Port.tls(4443)).in(SystemName.cd),
+ // Main endpoint in CD
+ "https://cd--i2--a2--t2.global.vespa.oath.cloud:4443/",
+ Endpoint.of(app2).named(endpointId).on(Port.tls(4443)).in(SystemName.cd),
+
// Main endpoint with direct routing and default TLS port
"https://a1.t1.global.vespa.oath.cloud/",
Endpoint.of(app1).named(endpointId).on(Port.tls()).directRouting().in(SystemName.main),
@@ -50,11 +54,11 @@ public class EndpointTest {
Endpoint.of(app1).named(EndpointId.of("r1")).on(Port.tls()).directRouting().in(SystemName.main),
// Main endpoint for custom instance in default rotation
- "https://a2.t2.global.vespa.oath.cloud/",
+ "https://i2.a2.t2.global.vespa.oath.cloud/",
Endpoint.of(app2).named(endpointId).on(Port.tls()).directRouting().in(SystemName.main),
// Main endpoint for custom instance with custom rotation name
- "https://r2.a2.t2.global.vespa.oath.cloud/",
+ "https://r2.i2.a2.t2.global.vespa.oath.cloud/",
Endpoint.of(app2).named(EndpointId.of("r2")).on(Port.tls()).directRouting().in(SystemName.main),
// Main endpoint in public system
@@ -82,6 +86,10 @@ public class EndpointTest {
Endpoint.of(app1).named(endpointId).on(Port.tls(4443)).in(SystemName.main),
// Main endpoint in CD
+ "https://cd--i2--a2--t2.global.vespa.oath.cloud:4443/",
+ Endpoint.of(app2).named(endpointId).on(Port.tls(4443)).in(SystemName.cd),
+
+ // Main endpoint in CD
"https://cd--a1--t1.global.vespa.oath.cloud:4443/",
Endpoint.of(app1).named(endpointId).on(Port.tls(4443)).in(SystemName.cd),
@@ -94,11 +102,11 @@ public class EndpointTest {
Endpoint.of(app1).named(EndpointId.of("r1")).on(Port.tls()).directRouting().in(SystemName.main),
// Main endpoint for custom instance in default rotation
- "https://a2.t2.global.vespa.oath.cloud/",
+ "https://i2.a2.t2.global.vespa.oath.cloud/",
Endpoint.of(app2).named(endpointId).on(Port.tls()).directRouting().in(SystemName.main),
// Main endpoint for custom instance with custom rotation name
- "https://r2.a2.t2.global.vespa.oath.cloud/",
+ "https://r2.i2.a2.t2.global.vespa.oath.cloud/",
Endpoint.of(app2).named(EndpointId.of("r2")).on(Port.tls()).directRouting().in(SystemName.main),
// Main endpoint in public system
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2-with-patches.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2-with-patches.json
index a7fe50485da..195219c691e 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2-with-patches.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2-with-patches.json
@@ -78,7 +78,7 @@
],
"changeBlockers": [],
"globalRotations": [
- "https://application2--tenant2.global.vespa.oath.cloud:4443/"
+ "https://instance1--application2--tenant2.global.vespa.oath.cloud:4443/"
],
"rotationId": "rotation-id-2",
"deployments": []
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2.json
index cdf011524d2..c29944924dc 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2.json
@@ -77,7 +77,7 @@
],
"changeBlockers": [],
"globalRotations": [
- "https://application2--tenant2.global.vespa.oath.cloud:4443/"
+ "https://instance1--application2--tenant2.global.vespa.oath.cloud:4443/"
],
"rotationId": "rotation-id-2",
"deployments": []
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-with-routing-policy.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-with-routing-policy.json
index d0abe24fa58..bb81125e54d 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-with-routing-policy.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-with-routing-policy.json
@@ -162,7 +162,7 @@
"changeBlockers": [],
"compileVersion": "(ignore)",
"globalRotations": [
- "https://c0.application1.tenant1.global.vespa.oath.cloud/"
+ "https://c0.instance1.application1.tenant1.global.vespa.oath.cloud/"
],
"instances": [
{
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-without-change-multiple-deployments.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-without-change-multiple-deployments.json
index c61932f15fe..75493a30155 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-without-change-multiple-deployments.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-without-change-multiple-deployments.json
@@ -211,7 +211,7 @@
"changeBlockers": [],
"compileVersion": "(ignore)",
"globalRotations": [
- "https://application1--tenant1.global.vespa.oath.cloud:4443/"
+ "https://instance1--application1--tenant1.global.vespa.oath.cloud:4443/"
],
"rotationId": "rotation-id-1",
"instances": [
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance.json
index b2ab9aa636d..061931336ed 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance.json
@@ -216,7 +216,7 @@
],
"compileVersion": "6.0.0",
"globalRotations": [
- "https://application1--tenant1.global.vespa.oath.cloud:4443/"
+ "https://instance1--application1--tenant1.global.vespa.oath.cloud:4443/"
],
"rotationId": "rotation-id-1",
"instances": [
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance1-recursive.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance1-recursive.json
index da73c36b208..2dacacedf51 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance1-recursive.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance1-recursive.json
@@ -216,7 +216,7 @@
],
"compileVersion": "(ignore)",
"globalRotations": [
- "https://application1--tenant1.global.vespa.oath.cloud:4443/"
+ "https://instance1--application1--tenant1.global.vespa.oath.cloud:4443/"
],
"rotationId": "rotation-id-1",
"instances": [