aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValerij Fredriksen <freva@users.noreply.github.com>2022-10-27 00:12:35 +0200
committerGitHub <noreply@github.com>2022-10-27 00:12:35 +0200
commit4ca182712758f3db0422050f83a270d84997ae42 (patch)
tree7a3bd862fdd45826f70757b24f39187192ca2fb3
parent9780cd86e13944f52a91a2ef58ce57f7858f3e3e (diff)
parentfcf295a4da2b5c34b567bfee5fdcfb36e7052f2b (diff)
Merge pull request #24606 from vespa-engine/jonmv/sleep-5-mins-on-parent-host-not-ready-first-timev8.75.16
Sleep 5 minutes on first parent host not ready
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java5
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunnerTest.java1
2 files changed, 5 insertions, 1 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 7a459e4f29f..e8c92d3e3f6 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
@@ -179,6 +179,7 @@ public class InternalStepRunner implements StepRunner {
controller.jobController().run(id)
.stepInfo(setTheStage ? deployInitialReal : deployReal).get()
.startTime().get(),
+ id,
logger)
.filter(result -> {
// If no tester cert, or deployment failed, propagate original result.
@@ -200,10 +201,11 @@ public class InternalStepRunner implements StepRunner {
controller.jobController().run(id)
.stepInfo(deployTester).get()
.startTime().get(),
+ id,
logger);
}
- private Optional<RunStatus> deploy(Supplier<DeploymentResult> deployment, Instant startTime, DualLogger logger) {
+ private Optional<RunStatus> deploy(Supplier<DeploymentResult> deployment, Instant startTime, RunId id, DualLogger logger) {
try {
DeploymentResult result = deployment.get();
logger.logAll(result.log().stream()
@@ -246,6 +248,7 @@ public class InternalStepRunner implements StepRunner {
}
case LOAD_BALANCER_NOT_READY, PARENT_HOST_NOT_READY -> {
logger.log(e.message()); // Consider splitting these messages in summary and details, on config server.
+ controller.jobController().locked(id, run -> run.sleepingUntil(startTime.plusSeconds(300)));
return result;
}
case NODE_ALLOCATION_FAILURE -> {
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunnerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunnerTest.java
index 7687a1561a4..9bf762d2f99 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunnerTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunnerTest.java
@@ -516,6 +516,7 @@ public class InternalStepRunnerTest {
assertEquals(oldTrusted, tester.configServer().application(app.instanceId(), id.type().zone()).get().applicationPackage().trustedCertificates());
tester.configServer().throwOnNextPrepare(null);
+ tester.clock().advance(Duration.ofSeconds(300));
tester.runner().run();
assertEquals(succeeded, tester.jobs().run(id).stepStatuses().get(Step.deployTester));
assertEquals(succeeded, tester.jobs().run(id).stepStatuses().get(Step.deployReal));