summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2019-04-15 08:48:41 +0200
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2019-04-15 08:48:41 +0200
commite8e232fda06f3deef1ec8f264d09217499ba1115 (patch)
treefccf5d049da03f0a745ae01e363c773299d2b59a /controller-server
parent7b5706030db59c0cd7c268e2d0336a641498858a (diff)
Time out jobs before deployment expires, to get Vespa log
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java7
1 files changed, 5 insertions, 2 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 883701b6a4d..27667ee97c5 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
@@ -523,8 +523,11 @@ public class InternalStepRunner implements StepRunner {
}
/** Returns whether the time elapsed since the last real deployment in the given zone is more than the given timeout. */
- private boolean timedOut(Deployment deployment, Duration timeout) {
- return deployment.at().isBefore(controller.clock().instant().minus(timeout));
+ private boolean timedOut(Deployment deployment, Duration defaultTimeout) {
+ Duration timeout = controller.zoneRegistry().getDeploymentTimeToLive(deployment.zone())
+ .filter(zoneTimeout -> zoneTimeout.compareTo(defaultTimeout) < 0)
+ .orElse(defaultTimeout);
+ return deployment.at().isBefore(controller.clock().instant().minus(timeout.minus(Duration.ofMinutes(1))));
}
/** Returns the application package for the tester application, assembled from a generated config, fat-jar and services.xml. */