diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2020-03-03 15:33:15 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2020-03-03 15:33:15 +0100 |
commit | 1676c7f550a2b36265951f0f22086b8f0b563863 (patch) | |
tree | 11fb7304da18df00adf6658e7b2dfac45af0b4bc | |
parent | dc10115a4f417d96cbd7aaed4b31374f5bb8d23d (diff) |
Retry on out-of-capacity for 5 minutes in CD
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java | 8 |
1 files changed, 6 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 628a7e41eb2..dc7fdeb8a98 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 @@ -115,6 +115,7 @@ public class InternalStepRunner implements StepRunner { static final NodeResources DEFAULT_TESTER_RESOURCES_AWS = new NodeResources(2, 8, 50, 0.3, NodeResources.DiskSpeed.any); + static final Duration capacityTimeout = Duration.ofMinutes(5); static final Duration endpointTimeout = Duration.ofMinutes(15); static final Duration endpointCertificateTimeout = Duration.ofMinutes(15); static final Duration testerTimeout = Duration.ofMinutes(30); @@ -275,7 +276,9 @@ public class InternalStepRunner implements StepRunner { return result; case OUT_OF_CAPACITY: logger.log(e.getServerMessage()); - return Optional.of(outOfCapacity); + return controller.system().isCd() && startTime.plus(capacityTimeout).isAfter(controller.clock().instant()) + ? Optional.empty() + : Optional.of(outOfCapacity); case INVALID_APPLICATION_PACKAGE: case BAD_REQUEST: logger.log(e.getMessage()); @@ -283,7 +286,8 @@ public class InternalStepRunner implements StepRunner { } throw e; - } catch (EndpointCertificateException e) { + } + catch (EndpointCertificateException e) { switch (e.type()) { case CERT_NOT_AVAILABLE: // Same as CERTIFICATE_NOT_READY above, only from the controller |