You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/11/30 22:35:28 UTC

[1/2] mesos git commit: Augmented FrameworkInfo to support multiple roles.

Repository: mesos
Updated Branches:
  refs/heads/master 55d7c7181 -> d06d05c76


Augmented FrameworkInfo to support multiple roles.

This is the initial patch to introduce multi-role frameworks.
A new section `repeated string roles` is added to FrameworkInfo.
Old `optional string role` is kept for backwards compatability.
To distinguish single-role and multi-role frameworks, a new framework
capability `MULTI_ROLE` is introduced. See MESOS-6628 for more info.

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


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

Branch: refs/heads/master
Commit: eb674bb61414e6367f5edbd945bf780fd63d58e1
Parents: 55d7c71
Author: Jay Guo <gu...@cn.ibm.com>
Authored: Wed Nov 30 14:30:11 2016 -0800
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Wed Nov 30 14:30:11 2016 -0800

----------------------------------------------------------------------
 include/mesos/mesos.proto    | 22 +++++++++++++++++++---
 include/mesos/v1/mesos.proto | 22 +++++++++++++++++++---
 2 files changed, 38 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/eb674bb6/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index cbfcd8a..3cec37f 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -245,9 +245,16 @@ message FrameworkInfo {
   // the cost of a (usually small) increase in disk I/O.
   optional bool checkpoint = 5 [default = false];
 
-  // Used to group frameworks for allocation decisions, depending on
-  // the allocation policy being used.
-  optional string role = 6 [default = "*"];
+  // Roles are the entities to which allocations are made.
+  // The framework must have at least one role in order to
+  // be offered resources. Note that `role` is deprecated
+  // in favor of `roles` and only one of these fields must
+  // be used. Since we cannot distinguish between empty
+  // `roles` and the default unset `role`, we require that
+  // frameworks set the `MULTI_ROLE` capability if
+  // setting the `roles` field.
+  optional string role = 6 [default = "*", deprecated=true];
+  repeated string roles = 12;
 
   // Used to indicate the current host from which the scheduler is
   // registered in the Mesos Web UI. If set to an empty string Mesos
@@ -318,6 +325,15 @@ message FrameworkInfo {
       // Mesos when the agent reregisters (unless the master has
       // failed over).
       PARTITION_AWARE = 5;
+
+      // This expresses the ability for the framework to be
+      // "multi-tenant" via using the newly introduced `roles`
+      // field, and examining `Offer.allocation_info` to determine
+      // which role the offers are being made to. We also
+      // expect that "single-tenant" schedulers eventually
+      // provide this and move away from the deprecated
+      // `role` field.
+      MULTI_ROLE = 6;
     }
 
     // Enum fields should be optional, see: MESOS-4997.

http://git-wip-us.apache.org/repos/asf/mesos/blob/eb674bb6/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index e4f269b..41ad941 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -245,9 +245,16 @@ message FrameworkInfo {
   // the cost of a (usually small) increase in disk I/O.
   optional bool checkpoint = 5 [default = false];
 
-  // Used to group frameworks for allocation decisions, depending on
-  // the allocation policy being used.
-  optional string role = 6 [default = "*"];
+  // Roles are the entities to which allocations are made.
+  // The framework must have at least one role in order to
+  // be offered resources. Note that `role` is deprecated
+  // in favor of `roles` and only one of these fields must
+  // be used. Since we cannot distinguish between empty
+  // `roles` and the default unset `role`, we require that
+  // frameworks set the `MULTI_ROLE` capability if
+  // setting the `roles` field.
+  optional string role = 6 [default = "*", deprecated=true];
+  repeated string roles = 12;
 
   // Used to indicate the current host from which the scheduler is
   // registered in the Mesos Web UI. If set to an empty string Mesos
@@ -318,6 +325,15 @@ message FrameworkInfo {
       // Mesos when the agent reregisters (unless the master has
       // failed over).
       PARTITION_AWARE = 5;
+
+      // This expresses the ability for the framework to be
+      // "multi-tenant" via using the newly introduced `roles`
+      // field, and examining `Offer.allocation_info` to determine
+      // which role the offers are being made to. We also
+      // expect that "single-tenant" schedulers eventually
+      // provide this and move away from the deprecated
+      // `role` field.
+      MULTI_ROLE = 6;
     }
 
     // Enum fields should be optional, see: MESOS-4997.


[2/2] mesos git commit: Added experimental warnings for multi-role frameworks.

Posted by bm...@apache.org.
Added experimental warnings for multi-role frameworks.


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

Branch: refs/heads/master
Commit: d06d05c76eca13745ca73039b93ad684b9d07196
Parents: eb674bb
Author: Benjamin Mahler <bm...@apache.org>
Authored: Wed Nov 30 14:35:09 2016 -0800
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Wed Nov 30 14:35:09 2016 -0800

----------------------------------------------------------------------
 include/mesos/mesos.proto    | 10 ++++++++--
 include/mesos/v1/mesos.proto | 10 ++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d06d05c7/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index 3cec37f..e6953ef 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -253,8 +253,11 @@ message FrameworkInfo {
   // `roles` and the default unset `role`, we require that
   // frameworks set the `MULTI_ROLE` capability if
   // setting the `roles` field.
+  //
+  // NOTE: The implmentation for supporting `roles`
+  // is not complete, DO NOT USE the `roles` field.
   optional string role = 6 [default = "*", deprecated=true];
-  repeated string roles = 12;
+  repeated string roles = 12; // EXPERIMENTAL.
 
   // Used to indicate the current host from which the scheduler is
   // registered in the Mesos Web UI. If set to an empty string Mesos
@@ -333,7 +336,10 @@ message FrameworkInfo {
       // expect that "single-tenant" schedulers eventually
       // provide this and move away from the deprecated
       // `role` field.
-      MULTI_ROLE = 6;
+      //
+      // NOTE: The implementation for supporting multiple
+      // roles is not complete, DO NOT USE THIS.
+      MULTI_ROLE = 6; // EXPERIMENTAL.
     }
 
     // Enum fields should be optional, see: MESOS-4997.

http://git-wip-us.apache.org/repos/asf/mesos/blob/d06d05c7/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index 41ad941..ae0fab0 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -253,8 +253,11 @@ message FrameworkInfo {
   // `roles` and the default unset `role`, we require that
   // frameworks set the `MULTI_ROLE` capability if
   // setting the `roles` field.
+  //
+  // NOTE: The implmentation for supporting `roles`
+  // is not complete, DO NOT USE the `roles` field.
   optional string role = 6 [default = "*", deprecated=true];
-  repeated string roles = 12;
+  repeated string roles = 12; // EXPERIMENTAL.
 
   // Used to indicate the current host from which the scheduler is
   // registered in the Mesos Web UI. If set to an empty string Mesos
@@ -333,7 +336,10 @@ message FrameworkInfo {
       // expect that "single-tenant" schedulers eventually
       // provide this and move away from the deprecated
       // `role` field.
-      MULTI_ROLE = 6;
+      //
+      // NOTE: The implementation for supporting multiple
+      // roles is not complete, DO NOT USE THIS.
+      MULTI_ROLE = 6; // EXPERIMENTAL.
     }
 
     // Enum fields should be optional, see: MESOS-4997.