You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2017/11/06 16:22:59 UTC

[1/2] mesos git commit: Fixed TASK_UNKNOWN status ambiguity.

Repository: mesos
Updated Branches:
  refs/heads/master e0ef27c46 -> 3df8bddd9


Fixed TASK_UNKNOWN status ambiguity.

Currently, TASK_UNKNOWN status covers 2 different cases: task is unknown
and the agent is unknown; task is unknown, but the agent is registered.
This makes it ambiguous to frameworks. In the first case the framework
may elect to wait for some time to see if the agent with the task comes
back. In the second case the task is definitely in a terminal state and
should be reported as TASK_GONE.

Review: https://reviews.apache.org/r/63526/


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

Branch: refs/heads/master
Commit: a8b7cc900afe83ddef705ef6f33d3629765165f9
Parents: e0ef27c
Author: Ilya Pronin <ip...@twopensource.com>
Authored: Mon Nov 6 10:22:36 2017 -0600
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Nov 6 10:22:36 2017 -0600

----------------------------------------------------------------------
 src/master/master.cpp              | 10 +++++-----
 src/tests/partition_tests.cpp      |  4 ++--
 src/tests/reconciliation_tests.cpp |  8 ++++----
 3 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a8b7cc90/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index c4afbf8..f349fec 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -7624,7 +7624,7 @@ void Master::_reconcileTasks(
   // Explicit reconciliation occurs for the following cases:
   //   (1) Task is known, but pending: TASK_STAGING.
   //   (2) Task is known: send the latest state.
-  //   (3) Task is unknown, slave is registered: TASK_UNKNOWN.
+  //   (3) Task is unknown, slave is registered: TASK_GONE.
   //   (4) Task is unknown, slave is transitioning: no-op.
   //   (5) Task is unknown, slave is unreachable: TASK_UNREACHABLE.
   //   (6) Task is unknown, slave is gone: TASK_GONE_BY_OPERATOR.
@@ -7678,10 +7678,10 @@ void Master::_reconcileTasks(
           None(),
           protobuf::getTaskContainerStatus(*task));
     } else if (slaveId.isSome() && slaves.registered.contains(slaveId.get())) {
-      // (3) Task is unknown, slave is registered: TASK_UNKNOWN. If
-      // the framework does not have the PARTITION_AWARE capability,
-      // send TASK_LOST for backward compatibility.
-      TaskState taskState = TASK_UNKNOWN;
+      // (3) Task is unknown, slave is registered: TASK_GONE. If the
+      // framework does not have the PARTITION_AWARE capability, send
+      // TASK_LOST for backward compatibility.
+      TaskState taskState = TASK_GONE;
       if (!framework->capabilities.partitionAware) {
         taskState = TASK_LOST;
       }

http://git-wip-us.apache.org/repos/asf/mesos/blob/a8b7cc90/src/tests/partition_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/partition_tests.cpp b/src/tests/partition_tests.cpp
index 7b11264..eead9ce 100644
--- a/src/tests/partition_tests.cpp
+++ b/src/tests/partition_tests.cpp
@@ -2369,7 +2369,7 @@ TEST_F(PartitionTest, PartitionAwareTaskCompletedOnPartitionedAgent)
   driver.reconcileTasks({status});
 
   AWAIT_READY(reconcileUpdate);
-  EXPECT_EQ(TASK_UNKNOWN, reconcileUpdate->state());
+  EXPECT_EQ(TASK_GONE, reconcileUpdate->state());
   EXPECT_EQ(TaskStatus::REASON_RECONCILIATION, reconcileUpdate->reason());
   EXPECT_FALSE(reconcileUpdate->has_unreachable_time());
 
@@ -3311,7 +3311,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(PartitionTest, RegistryGcRace)
   driver.reconcileTasks({status2});
 
   AWAIT_READY(reconcileUpdate2);
-  EXPECT_EQ(TASK_UNKNOWN, reconcileUpdate2->state());
+  EXPECT_EQ(TASK_GONE, reconcileUpdate2->state());
   EXPECT_EQ(TaskStatus::REASON_RECONCILIATION, reconcileUpdate2->reason());
   EXPECT_FALSE(reconcileUpdate2->has_unreachable_time());
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/a8b7cc90/src/tests/reconciliation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/reconciliation_tests.cpp b/src/tests/reconciliation_tests.cpp
index 8ae2860..671417f 100644
--- a/src/tests/reconciliation_tests.cpp
+++ b/src/tests/reconciliation_tests.cpp
@@ -333,8 +333,8 @@ TEST_F(ReconciliationTest, UnknownTask)
 
 
 // This test verifies that reconciliation of an unknown task that
-// belongs to a known slave results in TASK_UNKNOWN if the framework
-// is partition-aware.
+// belongs to a known slave results in TASK_GONE if the framework is
+// partition-aware.
 TEST_F(ReconciliationTest, UnknownTaskPartitionAware)
 {
   Try<Owned<cluster::Master>> master = StartMaster();
@@ -383,9 +383,9 @@ TEST_F(ReconciliationTest, UnknownTaskPartitionAware)
 
   driver.reconcileTasks({status});
 
-  // Framework should receive TASK_UNKNOWN for an unknown task.
+  // Framework should receive TASK_GONE for an unknown task.
   AWAIT_READY(update);
-  EXPECT_EQ(TASK_UNKNOWN, update->state());
+  EXPECT_EQ(TASK_GONE, update->state());
   EXPECT_EQ(TaskStatus::REASON_RECONCILIATION, update->reason());
   EXPECT_FALSE(update->has_unreachable_time());
 


[2/2] mesos git commit: Added MESOS-8165 to the 1.5.0 CHANGELOG.

Posted by vi...@apache.org.
Added MESOS-8165 to the 1.5.0 CHANGELOG.

Review: https://reviews.apache.org/r/63527/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3df8bddd
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3df8bddd
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3df8bddd

Branch: refs/heads/master
Commit: 3df8bddd9ee2a5f66f3e144a0f63188566bd29ee
Parents: a8b7cc9
Author: Ilya Pronin <ip...@twopensource.com>
Authored: Mon Nov 6 10:22:44 2017 -0600
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Nov 6 10:22:44 2017 -0600

----------------------------------------------------------------------
 CHANGELOG | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/3df8bddd/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 3a76a2b..3d65032 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,6 +9,9 @@ Additional API Changes:
     seconds (365 days).
   * [MESOS-7941] Built-in executors will now send a TASK_STARTING
     status update when a task is starting.
+  * [MESOS-8165] Master will now send TASK_GONE status for unknown
+    tasks of PARTITION_AWARE frameworks belonging to registered agents
+    during explicit reconciliation.
 
 Unresolved Critical Issues: