summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Marius Venstad <jonmv@users.noreply.github.com>2021-07-07 15:04:16 +0200
committerGitHub <noreply@github.com>2021-07-07 15:04:16 +0200
commitff26a2acc4ffa51d06e4e8cd9faaa6864e7e0a46 (patch)
tree3f34f1dddf6d68a01b1d6a4ef239bfc538b16304
parentab352f05ec49c4ccbb54b255b1405cce1fec59c9 (diff)
parent41c962dec99e2d6c7d630b451fae9b5e03755833 (diff)
Merge pull request #18560 from vespa-engine/jonmv/time-out-job-reporting-after-3min
Time out job reporting after 3 minutes
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java9
1 files changed, 7 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 47478d14c33..3b6a03a76c9 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
@@ -66,7 +66,6 @@ import java.time.Instant;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
-import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
@@ -88,7 +87,6 @@ import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.error;
import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.installationFailed;
import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.outOfCapacity;
import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.running;
-import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.success;
import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.testFailure;
import static com.yahoo.vespa.hosted.controller.deployment.Step.Status.succeeded;
import static com.yahoo.vespa.hosted.controller.deployment.Step.copyVespaLogs;
@@ -98,6 +96,7 @@ import static com.yahoo.vespa.hosted.controller.deployment.Step.deployInitialRea
import static com.yahoo.vespa.hosted.controller.deployment.Step.deployReal;
import static com.yahoo.vespa.hosted.controller.deployment.Step.deployTester;
import static com.yahoo.vespa.hosted.controller.deployment.Step.installTester;
+import static com.yahoo.vespa.hosted.controller.deployment.Step.report;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Objects.requireNonNull;
import static java.util.logging.Level.INFO;
@@ -710,6 +709,12 @@ public class InternalStepRunner implements StepRunner {
logger.log(INFO, "Job '" + id.type() + "' no longer supposed to run?", e);
return Optional.of(error);
}
+ catch (RuntimeException e) {
+ Instant start = controller.jobController().run(id).get().stepInfo(report).get().startTime().get();
+ return (controller.clock().instant().isAfter(start.plusSeconds(180)))
+ ? Optional.empty()
+ : Optional.of(error);
+ }
return Optional.of(running);
}