aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmclaugh...@apache.org
Subject aurora git commit: Fix error handling logic for launch failures
Date Thu, 25 Jan 2018 18:51:41 GMT
Repository: aurora
Updated Branches:
  refs/heads/master dbe713743 -> 007212d80


Fix error handling logic for launch failures

Bugs closed: AURORA-1965

Reviewed at https://reviews.apache.org/r/65338/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/007212d8
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/007212d8
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/007212d8

Branch: refs/heads/master
Commit: 007212d80f06290f6db4c77e9d8a89b98f468ca2
Parents: dbe7137
Author: David McLaughlin <david@dmclaughlin.com>
Authored: Thu Jan 25 10:50:45 2018 -0800
Committer: David McLaughlin <david@dmclaughlin.com>
Committed: Thu Jan 25 10:50:45 2018 -0800

----------------------------------------------------------------------
 .../org/apache/aurora/scheduler/scheduling/TaskAssignerImpl.java | 4 ++--
 .../apache/aurora/scheduler/scheduling/TaskAssignerImplTest.java | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/007212d8/src/main/java/org/apache/aurora/scheduler/scheduling/TaskAssignerImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/scheduling/TaskAssignerImpl.java b/src/main/java/org/apache/aurora/scheduler/scheduling/TaskAssignerImpl.java
index 916908b..fcafecf 100644
--- a/src/main/java/org/apache/aurora/scheduler/scheduling/TaskAssignerImpl.java
+++ b/src/main/java/org/apache/aurora/scheduler/scheduling/TaskAssignerImpl.java
@@ -48,8 +48,8 @@ import org.slf4j.LoggerFactory;
 import static java.util.Objects.requireNonNull;
 
 import static org.apache.aurora.common.inject.TimedInterceptor.Timed;
+import static org.apache.aurora.gen.ScheduleStatus.ASSIGNED;
 import static org.apache.aurora.gen.ScheduleStatus.LOST;
-import static org.apache.aurora.gen.ScheduleStatus.PENDING;
 
 public class TaskAssignerImpl implements TaskAssigner {
   private static final Logger LOG = LoggerFactory.getLogger(TaskAssignerImpl.class);
@@ -132,7 +132,7 @@ public class TaskAssignerImpl implements TaskAssigner {
       // It is in the LOST state and a new task will move to PENDING to replace it.
       // Should the state change fail due to storage issues, that's okay.  The task will
       // time out in the ASSIGNED state and be moved to LOST.
-      stateManager.changeState(stores, taskId, Optional.of(PENDING), LOST, LAUNCH_FAILED_MSG);
+      stateManager.changeState(stores, taskId, Optional.of(ASSIGNED), LOST, LAUNCH_FAILED_MSG);
       throw e;
     }
   }

http://git-wip-us.apache.org/repos/asf/aurora/blob/007212d8/src/test/java/org/apache/aurora/scheduler/scheduling/TaskAssignerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/scheduling/TaskAssignerImplTest.java
b/src/test/java/org/apache/aurora/scheduler/scheduling/TaskAssignerImplTest.java
index 533bb44..864538b 100644
--- a/src/test/java/org/apache/aurora/scheduler/scheduling/TaskAssignerImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/scheduling/TaskAssignerImplTest.java
@@ -47,8 +47,8 @@ import org.apache.mesos.v1.Protos.TaskInfo;
 import org.junit.Before;
 import org.junit.Test;
 
+import static org.apache.aurora.gen.ScheduleStatus.ASSIGNED;
 import static org.apache.aurora.gen.ScheduleStatus.LOST;
-import static org.apache.aurora.gen.ScheduleStatus.PENDING;
 import static org.apache.aurora.scheduler.base.TaskTestUtil.JOB;
 import static org.apache.aurora.scheduler.base.TaskTestUtil.makeTask;
 import static org.apache.aurora.scheduler.filter.AttributeAggregate.empty;
@@ -161,7 +161,7 @@ public class TaskAssignerImplTest extends EasyMockTest {
     expect(stateManager.changeState(
         storeProvider,
         TASK.getTaskId(),
-        Optional.of(PENDING),
+        Optional.of(ASSIGNED),
         LOST,
         LAUNCH_FAILED_MSG))
         .andReturn(StateChangeResult.SUCCESS);


Mime
View raw message