diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2019-10-31 11:58:25 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2019-10-31 11:59:41 +0100 |
commit | e6b0037b63304c39c93ba35bfee2d23480c2c842 (patch) | |
tree | 76ea4afd217067eb59a63392af6b22ef21360f8d /controller-server/src | |
parent | 4b7d181c3065eed971c6302179f818a60e94244f (diff) |
Let OUT_OF_CAPACITY fail test jobs, for retry on a higher level
Diffstat (limited to 'controller-server/src')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java | 9 |
1 files changed, 5 insertions, 4 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 970a57ed75e..64164b45729 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 @@ -250,8 +250,7 @@ public class InternalStepRunner implements StepRunner { return Optional.of(running); } catch (ConfigServerException e) { - if ( e.getErrorCode() == OUT_OF_CAPACITY && type.isTest() - || e.getErrorCode() == ACTIVATION_CONFLICT + if ( e.getErrorCode() == ACTIVATION_CONFLICT || e.getErrorCode() == APPLICATION_LOCK_FAILURE || e.getErrorCode() == PARENT_HOST_NOT_READY || e.getErrorCode() == CERTIFICATE_NOT_READY @@ -560,10 +559,12 @@ public class InternalStepRunner implements StepRunner { private Optional<RunStatus> report(RunId id, DualLogger logger) { try { controller.jobController().active(id).ifPresent(run -> { - JobReport report = JobReport.ofJob(run.id().application(), + JobReport report = JobReport.ofJob(run.id().application(), run.id().type(), run.id().number(), - run.hasFailed() ? Optional.of(DeploymentJobs.JobError.unknown) : Optional.empty()); + ! run.hasFailed() ? Optional.empty() + : Optional.of(run.status() == outOfCapacity ? DeploymentJobs.JobError.outOfCapacity + : DeploymentJobs.JobError.unknown)); controller.applications().deploymentTrigger().notifyOfCompletion(report); if (run.hasFailed()) |