summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2021-07-09 11:13:27 +0200
committerJon Marius Venstad <venstad@gmail.com>2021-07-09 11:13:27 +0200
commitb030d222d29c98f3bb1c13a67b42887cce7ee850 (patch)
tree3e1e4aee8008a106504cedde42ac30875301ed62 /controller-server
parent4b5ca059eda0ab6f3c1fa0c718980d7a6e978288 (diff)
Test whether run _should_ use tester cert, not if it already has
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java10
1 files changed, 7 insertions, 3 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 3b6a03a76c9..c49e3c88df3 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
@@ -198,7 +198,7 @@ public class InternalStepRunner implements StepRunner {
logger)
.filter(result -> {
// If no tester cert, or deployment failed, propagate original result.
- if (testerCertificate.isEmpty() || result != running)
+ if ( ! useTesterCertificate(id) || result != running)
return true;
// If tester cert, ensure real is deployed with the tester cert whose key was successfully deployed.
return controller.jobController().run(id).get().stepStatus(deployTester).get() == succeeded
@@ -828,16 +828,20 @@ public class InternalStepRunner implements StepRunner {
return deployment.at().isBefore(controller.clock().instant().minus(timeout.minus(Duration.ofMinutes(1))));
}
+ private boolean useTesterCertificate(RunId id) {
+ return controller.system().isPublic() && id.type().environment().isTest();
+ }
+
/** Returns the application package for the tester application, assembled from a generated config, fat-jar and services.xml. */
private ApplicationPackage testerPackage(RunId id) {
ApplicationVersion version = controller.jobController().run(id).get().versions().targetApplication();
DeploymentSpec spec = controller.applications().requireApplication(TenantAndApplicationId.from(id.application())).deploymentSpec();
ZoneId zone = id.type().zone(controller.system());
- boolean useTesterCertificate = controller.system().isPublic() && id.type().environment().isTest();
+ boolean useTesterCertificate = useTesterCertificate(id);
boolean useOsgiBasedTestRuntime = testerPlatformVersion(id).isAfter(new Version(7, 247, 11));
- byte[] servicesXml = servicesXml(! controller.system().isPublic(),
+ byte[] servicesXml = servicesXml( ! controller.system().isPublic(),
useTesterCertificate,
useOsgiBasedTestRuntime,
testerResourcesFor(zone, spec.requireInstance(id.application().instance())),