mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject mesos git commit: Documented task, executor, and volume IDs reuse is discouraged.
Date Thu, 24 Mar 2016 22:09:49 GMT
Repository: mesos
Updated Branches:
  refs/heads/master 829481a73 -> 71c500a72


Documented task, executor, and volume IDs reuse is discouraged.

This is generally a bad idea for (at least) two reasons:

(1) Determining when the previous entity with the ID has terminated
    can be non-trivial. Several frameworks have done this incorrectly
    in the past.

(2) When reusing IDs, logs can be more difficult to read because the
    same ID can refer to different entities at different times.

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


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

Branch: refs/heads/master
Commit: 71c500a721ad21d0d0ac614a4054b4a75fb70434
Parents: 829481a
Author: Neil Conway <neil.conway@gmail.com>
Authored: Thu Mar 24 15:09:29 2016 -0700
Committer: Jie Yu <yujie.jay@gmail.com>
Committed: Thu Mar 24 15:09:29 2016 -0700

----------------------------------------------------------------------
 include/mesos/mesos.proto    | 35 ++++++++++++++++++-----------------
 include/mesos/v1/mesos.proto | 35 ++++++++++++++++++-----------------
 2 files changed, 36 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/71c500a7/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index 82a9550..cb68e2c 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -60,10 +60,11 @@ message SlaveID {
 
 
 /**
- * A framework generated ID to distinguish a task. The ID must remain
- * unique while the task is active. However, a framework can reuse an
- * ID _only_ if a previous task with the same ID has reached a
- * terminal state (e.g., TASK_FINISHED, TASK_LOST, TASK_KILLED, etc.).
+ * A framework-generated ID to distinguish a task. The ID must remain
+ * unique while the task is active. A framework can reuse an ID _only_
+ * if the previous task with the same ID has reached a terminal state
+ * (e.g., TASK_FINISHED, TASK_LOST, TASK_KILLED, etc.). However,
+ * reusing task IDs is strongly discouraged (MESOS-2198).
  */
 message TaskID {
   required string value = 1;
@@ -71,9 +72,9 @@ message TaskID {
 
 
 /**
- * A framework generated ID to distinguish an executor. Only one
+ * A framework-generated ID to distinguish an executor. Only one
  * executor with the same ID can be active on the same slave at a
- * time.
+ * time. However, reusing executor IDs is discouraged.
  */
 message ExecutorID {
   required string value = 1;
@@ -81,7 +82,7 @@ message ExecutorID {
 
 
 /**
- * A slave generated ID to distinguish a container. The ID must be unique
+ * A slave-generated ID to distinguish a container. The ID must be unique
  * between any active or completed containers on the slave. In particular,
  * containers for different runs of the same (framework, executor) pair must be
  * unique.
@@ -670,19 +671,19 @@ message Resource {
 
   message DiskInfo {
     // Describes a persistent disk volume.
+    //
     // A persistent disk volume will not be automatically garbage
-    // collected if the task/executor/slave terminates, but is
+    // collected if the task/executor/slave terminates, but will be
     // re-offered to the framework(s) belonging to the 'role'.
-    // A framework can set the ID (if it is not set yet) to express
-    // the intention to create a new persistent disk volume from a
-    // regular disk resource. To reuse a previously created volume, a
-    // framework can launch a task/executor when it receives an offer
-    // with a persistent volume, i.e., ID is set.
-    // NOTE: Currently, we do not allow a persistent disk volume
-    // without a reservation (i.e., 'role' should not be '*').
+    //
+    // NOTE: Currently, we do not allow persistent disk volumes
+    // without a reservation (i.e., 'role' cannot be '*').
     message Persistence {
-      // A unique ID for the persistent disk volume.
-      // NOTE: The ID needs to be unique per role on each slave.
+      // A unique ID for the persistent disk volume. This ID must be
+      // unique per role on each slave. Although it is possible to use
+      // the same ID on different slaves in the cluster and to reuse
+      // IDs after a volume with that ID has been destroyed, both
+      // practices are discouraged.
       required string id = 1;
 
       // This field indicates the principal of the operator or

http://git-wip-us.apache.org/repos/asf/mesos/blob/71c500a7/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index bec00ad..af1dc9e 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -60,10 +60,11 @@ message AgentID {
 
 
 /**
- * A framework generated ID to distinguish a task. The ID must remain
- * unique while the task is active. However, a framework can reuse an
- * ID _only_ if a previous task with the same ID has reached a
- * terminal state (e.g., TASK_FINISHED, TASK_LOST, TASK_KILLED, etc.).
+ * A framework-generated ID to distinguish a task. The ID must remain
+ * unique while the task is active. A framework can reuse an ID _only_
+ * if the previous task with the same ID has reached a terminal state
+ * (e.g., TASK_FINISHED, TASK_LOST, TASK_KILLED, etc.). However,
+ * reusing task IDs is strongly discouraged (MESOS-2198).
  */
 message TaskID {
   required string value = 1;
@@ -71,9 +72,9 @@ message TaskID {
 
 
 /**
- * A framework generated ID to distinguish an executor. Only one
+ * A framework-generated ID to distinguish an executor. Only one
  * executor with the same ID can be active on the same agent at a
- * time.
+ * time. However, reusing executor IDs is discouraged.
  */
 message ExecutorID {
   required string value = 1;
@@ -81,7 +82,7 @@ message ExecutorID {
 
 
 /**
- * An agent generated ID to distinguish a container. The ID must be
+ * An agent-generated ID to distinguish a container. The ID must be
  * unique between any active or completed containers on the agent. In
  * particular, containers for different runs of the same (framework,
  * executor) pair must be unique.
@@ -664,19 +665,19 @@ message Resource {
 
   message DiskInfo {
     // Describes a persistent disk volume.
+    //
     // A persistent disk volume will not be automatically garbage
-    // collected if the task/executor/agent terminates, but is
+    // collected if the task/executor/agent terminates, but will be
     // re-offered to the framework(s) belonging to the 'role'.
-    // A framework can set the ID (if it is not set yet) to express
-    // the intention to create a new persistent disk volume from a
-    // regular disk resource. To reuse a previously created volume, a
-    // framework can launch a task/executor when it receives an offer
-    // with a persistent volume, i.e., ID is set.
-    // NOTE: Currently, we do not allow a persistent disk volume
-    // without a reservation (i.e., 'role' should not be '*').
+    //
+    // NOTE: Currently, we do not allow persistent disk volumes
+    // without a reservation (i.e., 'role' cannot be '*').
     message Persistence {
-      // A unique ID for the persistent disk volume.
-      // NOTE: The ID needs to be unique per role on each agent.
+      // A unique ID for the persistent disk volume. This ID must be
+      // unique per role on each agent. Although it is possible to use
+      // the same ID on different agents in the cluster and to reuse
+      // IDs after a volume with that ID has been destroyed, both
+      // practices are discouraged.
       required string id = 1;
 
       // This field indicates the principal of the operator or


Mime
View raw message