summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValerij Fredriksen <freva@users.noreply.github.com>2022-11-07 12:02:59 +0100
committerGitHub <noreply@github.com>2022-11-07 12:02:59 +0100
commit610a597539f1d7e778c7060b7d282b3cbe711922 (patch)
treea0fd76d49cdff85f5bdaaf130f1fedc7cc88f664
parent338c241e1df16dd4989f9413d669ca0a946118f3 (diff)
parentd2e17e3e1f62a6b897a0323c4464ef797951438b (diff)
Merge pull request #24775 from vespa-engine/jonmv/less-agressive-retries-when-waiting-for-hosts
Retry less aggressively while waiting for host provisioning
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java4
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunnerTest.java2
2 files changed, 4 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 e8c92d3e3f6..e6d793affff 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
@@ -248,7 +248,9 @@ 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)));
+ Instant someTimeAfterStart = startTime.plusSeconds(450);
+ Instant inALittleWhile = controller.clock().instant().plusSeconds(90);
+ controller.jobController().locked(id, run -> run.sleepingUntil(someTimeAfterStart.isAfter(inALittleWhile) ? someTimeAfterStart : inALittleWhile));
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 9bf762d2f99..2f245ab9736 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,7 +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.clock().advance(Duration.ofSeconds(450));
tester.runner().run();
assertEquals(succeeded, tester.jobs().run(id).stepStatuses().get(Step.deployTester));
assertEquals(succeeded, tester.jobs().run(id).stepStatuses().get(Step.deployReal));