diff options
author | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2019-04-15 08:48:41 +0200 |
---|---|---|
committer | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2019-04-15 08:48:41 +0200 |
commit | e8e232fda06f3deef1ec8f264d09217499ba1115 (patch) | |
tree | fccf5d049da03f0a745ae01e363c773299d2b59a /controller-server | |
parent | 7b5706030db59c0cd7c268e2d0336a641498858a (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.java | 7 |
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. */ |