diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2017-10-12 15:47:19 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2017-10-12 15:47:19 +0200 |
commit | d0548a3fcb0f933d1d84bc03e47f958da64ee359 (patch) | |
tree | 18a55d36d325f21e6cf413d12566de2b396c4df9 /controller-server | |
parent | 2b9ffdd9302e564ccf67957be626d30933a2639f (diff) |
Use a shorter job timeout in CD.
We won't need very long running jobs there and a shorter timeout helps
us make progress if there is a Screwdriver issue preventing callbacks
on completion.
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java index a5d7786f3e9..407d28264d1 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java @@ -4,6 +4,7 @@ package com.yahoo.vespa.hosted.controller.deployment; import com.yahoo.config.application.api.DeploymentSpec; import com.yahoo.config.provision.ApplicationId; import com.yahoo.config.provision.Environment; +import com.yahoo.config.provision.SystemName; import com.yahoo.config.provision.Zone; import com.yahoo.vespa.curator.Lock; import com.yahoo.vespa.hosted.controller.Application; @@ -39,7 +40,7 @@ import java.util.logging.Logger; public class DeploymentTrigger { /** The max duration a job may run before we consider it dead/hanging */ - private final static Duration jobTimeout = Duration.ofHours(12); + private final Duration jobTimeout; private final static Logger log = Logger.getLogger(DeploymentTrigger.class.getName()); @@ -50,11 +51,13 @@ public class DeploymentTrigger { public DeploymentTrigger(Controller controller, CuratorDb curator, Clock clock) { Objects.requireNonNull(controller,"controller cannot be null"); + Objects.requireNonNull(curator,"curator cannot be null"); Objects.requireNonNull(clock,"clock cannot be null"); this.controller = controller; this.clock = clock; this.buildSystem = new PolledBuildSystem(controller, curator); this.order = new DeploymentOrder(controller); + this.jobTimeout = controller.system().equals(SystemName.main) ? Duration.ofHours(12) : Duration.ofHours(1); } /** Returns the time in the past before which jobs are at this moment considered unresponsive */ |