summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-01-27 13:01:41 +0100
committerHarald Musum <musum@verizonmedia.com>2020-01-27 13:01:41 +0100
commitd652a9764e88252511cc401274eac1b93098f549 (patch)
tree84819f634e3a51b5c2756121c65a5c738e89f2c5
parent0f351480627ee6c1ab034b5791e4d67350c79015 (diff)
Use TesterCloud instead of calling config server directly
Also remove unused testerReady() method
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java16
1 files changed, 5 insertions, 11 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java
index e0b83670027..480f5c68262 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java
@@ -473,6 +473,8 @@ public class InternalStepRunner implements StepRunner {
private boolean endpointsAvailable(ApplicationId id, ZoneId zone, DualLogger logger) {
+ if (useConfigServerForTesterAPI(zone) && id.instance().isTester()) return true; // Endpoints not used in this case, always return true
+
var endpoints = controller.applications().clusterEndpoints(Set.of(new DeploymentId(id, zone)));
if ( ! endpoints.containsKey(zone)) {
logger.log("Endpoints not yet ready.");
@@ -555,7 +557,7 @@ public class InternalStepRunner implements StepRunner {
Optional<URI> testerEndpoint = controller.jobController().testerEndpoint(id);
if (useConfigServerForTesterAPI(zoneId)) {
- if ( ! controller.serviceRegistry().configServer().isTesterReady(getTesterDeploymentId(id))) {
+ if ( ! controller.jobController().cloud().testerReady(getTesterDeploymentId(id))) {
logger.log(WARNING, "Tester container went bad!");
return Optional.of(error);
}
@@ -579,21 +581,13 @@ public class InternalStepRunner implements StepRunner {
endpoints,
controller.applications().contentClustersByZone(deployments));
if (useConfigServerForTesterAPI(zoneId)) {
- controller.serviceRegistry().configServer().startTests(getTesterDeploymentId(id), suite, config);
+ controller.jobController().cloud().startTests(getTesterDeploymentId(id), suite, config);
} else {
controller.jobController().cloud().startTests(testerEndpoint.get(), suite, config);
}
return Optional.of(running);
}
- private boolean testerReady(RunId id, URI testerEndpoint) {
- if (useConfigServerForTesterAPI(id.type().zone(controller.system()))) {
- return controller.serviceRegistry().configServer().isTesterReady(getTesterDeploymentId(id));
- } else {
- return controller.jobController().cloud().testerReady(testerEndpoint);
- }
- }
-
private Optional<RunStatus> endTests(RunId id, DualLogger logger) {
if (deployment(id.application(), id.type()).isEmpty()) {
logger.log(INFO, "Deployment expired before tests could complete.");
@@ -615,7 +609,7 @@ public class InternalStepRunner implements StepRunner {
TesterCloud.Status testStatus;
if (useConfigServerForTesterAPI(id.type().zone(controller.system()))) {
- testStatus = controller.serviceRegistry().configServer().getTesterStatus(getTesterDeploymentId(id));
+ testStatus = controller.jobController().cloud().getStatus(getTesterDeploymentId(id));
} else {
Optional<URI> testerEndpoint = controller.jobController().testerEndpoint(id);
if (testerEndpoint.isEmpty()) {