aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2019-08-01 19:18:24 +0200
committerHarald Musum <musum@verizonmedia.com>2019-08-01 19:18:24 +0200
commitf5fb694068351f2357f522db40946b6d3c1960d0 (patch)
tree50a204c4b4f3693f6fc2a3fe62a907f79ab3d355 /controller-server
parentd7681022d05a5929b4fb4935538b122eb00767ee (diff)
Return 409 with error code LOAD_BALANCER_NOT_READY if deployment fails due to that
Move LoadBalancerServiceException to config-provisioning so that it can be used from config server as well. Return 409 and LOAD_BALANCER_NOT_READY as error code if we get a LoadBalancerServiceException. Retry deploy on LOAD_BALANCER_NOT_READY.
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java4
1 files changed, 3 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 d2942d77b7a..7ee834844af 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
@@ -62,6 +62,7 @@ import static com.yahoo.vespa.hosted.controller.api.integration.configserver.Con
import static com.yahoo.vespa.hosted.controller.api.integration.configserver.ConfigServerException.ErrorCode.BAD_REQUEST;
import static com.yahoo.vespa.hosted.controller.api.integration.configserver.ConfigServerException.ErrorCode.CERTIFICATE_NOT_READY;
import static com.yahoo.vespa.hosted.controller.api.integration.configserver.ConfigServerException.ErrorCode.INVALID_APPLICATION_PACKAGE;
+import static com.yahoo.vespa.hosted.controller.api.integration.configserver.ConfigServerException.ErrorCode.LOAD_BALANCER_NOT_READY;
import static com.yahoo.vespa.hosted.controller.api.integration.configserver.ConfigServerException.ErrorCode.OUT_OF_CAPACITY;
import static com.yahoo.vespa.hosted.controller.api.integration.configserver.ConfigServerException.ErrorCode.PARENT_HOST_NOT_READY;
import static com.yahoo.vespa.hosted.controller.api.integration.configserver.Node.State.active;
@@ -232,7 +233,8 @@ public class InternalStepRunner implements StepRunner {
|| e.getErrorCode() == ACTIVATION_CONFLICT
|| e.getErrorCode() == APPLICATION_LOCK_FAILURE
|| e.getErrorCode() == PARENT_HOST_NOT_READY
- || e.getErrorCode() == CERTIFICATE_NOT_READY) {
+ || e.getErrorCode() == CERTIFICATE_NOT_READY
+ || e.getErrorCode() == LOAD_BALANCER_NOT_READY) {
logger.log("Will retry, because of '" + e.getErrorCode() + "' deploying:\n" + e.getMessage());
return Optional.empty();
}