Skip to content

Commit

Permalink
Merge pull request #24606 from vespa-engine/jonmv/sleep-5-mins-on-par…
Browse files Browse the repository at this point in the history
…ent-host-not-ready-first-time

Sleep 5 minutes on first parent host not ready
  • Loading branch information
freva authored Oct 26, 2022
2 parents 9780cd8 + fcf295a commit 4ca1827
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ private Optional<RunStatus> deployReal(RunId id, boolean setTheStage, DualLogger
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.
Expand All @@ -200,10 +201,11 @@ private Optional<RunStatus> deployTester(RunId id, DualLogger logger) {
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()
Expand Down Expand Up @@ -246,6 +248,7 @@ private Optional<RunStatus> deploy(Supplier<DeploymentResult> deployment, Instan
}
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 -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ public void realDeploymentRequiresForTesterCert() {
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));
Expand Down

0 comments on commit 4ca1827

Please sign in to comment.