This is an automated email from the ASF dual-hosted git repository.

bmahler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/master by this push:
     new c0ca15e  Added an UPDATE_FRAMEWORK scheduler::Call.
c0ca15e is described below

commit c0ca15e9378e54efe2b23cffab458e2bb47c25c2
Author: Andrei Sekretenko <[email protected]>
AuthorDate: Sun May 12 00:29:47 2019 -0400

    Added an UPDATE_FRAMEWORK scheduler::Call.
    
    This patch defines the call to be used by a framework for updating its
    FrameworkInfo fields without re-subscribing.
    
    It is based on the previous implementation attempt:
    https://reviews.apache.org/r/66228/
    
    Review: https://reviews.apache.org/r/70532/
---
 include/mesos/scheduler/scheduler.proto    | 30 ++++++++++++++++++++++++++++++
 include/mesos/v1/scheduler/scheduler.proto | 30 ++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git a/include/mesos/scheduler/scheduler.proto 
b/include/mesos/scheduler/scheduler.proto
index b6d79b1..6e1639a 100644
--- a/include/mesos/scheduler/scheduler.proto
+++ b/include/mesos/scheduler/scheduler.proto
@@ -267,6 +267,7 @@ message Call {
     MESSAGE = 10;    // See 'Message' below.
     REQUEST = 11;    // See 'Request' below.
     SUPPRESS = 12;   // Inform master to stop sending offers to the framework.
+    UPDATE_FRAMEWORK = 17; // See `UpdateFramework` below.
 
     // TODO(benh): Consider adding an 'ACTIVATE' and 'DEACTIVATE' for
     // already subscribed frameworks as a way of stopping offers from
@@ -488,6 +489,34 @@ message Call {
     repeated string roles = 1;
   }
 
+  // Updates the FrameworkInfo. All fields can be updated except for:
+  //
+  // * FrameworkInfo.checkpoint
+  // * FrameworkInfo.principal
+  // * FrameworkInfo.user
+  //
+  // The call returns after the update is either applied completely or
+  // not applied at all. No incomplete updates occur.
+  //
+  // The HTTP response codes specific to this call are:
+  //
+  // * 200 OK: update operation was successfully completed.
+  // * 400 Bad Request: the requested update is not valid.
+  // * 403 Forbidden: framework is not authorized to use some entities
+  //   requested by the update (e.g. not authorized to use some of the
+  //   supplied roles).
+  // * 409 Conflict: framework disappeared while this call was being processed
+  //   (example: the framework was removed by a concurrent TEARDOWN call).
+  //
+  message UpdateFramework {
+    required FrameworkInfo framework_info = 1;
+
+    // List of suppressed roles for which the framework does not wish to be
+    // offered resources. The framework can decide to suppress all or a subset
+    // of roles provided in the new `framework_info`.
+    repeated string suppressed_roles = 2;
+  }
+
   // Identifies who generated this call. Master assigns a framework id
   // when a new scheduler subscribes for the first time. Once assigned,
   // the scheduler must set the 'framework_id' here and within its
@@ -517,4 +546,5 @@ message Call {
   optional Message message = 10;
   optional Request request = 11;
   optional Suppress suppress = 16;
+  optional UpdateFramework update_framework = 19;
 }
diff --git a/include/mesos/v1/scheduler/scheduler.proto 
b/include/mesos/v1/scheduler/scheduler.proto
index bddd5c4..eb5fdeb 100644
--- a/include/mesos/v1/scheduler/scheduler.proto
+++ b/include/mesos/v1/scheduler/scheduler.proto
@@ -265,6 +265,7 @@ message Call {
     MESSAGE = 10;    // See 'Message' below.
     REQUEST = 11;    // See 'Request' below.
     SUPPRESS = 12;   // Inform master to stop sending offers to the framework.
+    UPDATE_FRAMEWORK = 17; // See 'UpdateFramework' below.
 
     // TODO(benh): Consider adding an 'ACTIVATE' and 'DEACTIVATE' for
     // already subscribed frameworks as a way of stopping offers from
@@ -480,6 +481,34 @@ message Call {
     repeated string roles = 1;
   }
 
+  // Updates the FrameworkInfo. All fields can be updated except for:
+  //
+  // * FrameworkInfo.checkpoint
+  // * FrameworkInfo.principal
+  // * FrameworkInfo.user
+  //
+  // The call returns after the update is either applied completely or
+  // not applied at all. No incomplete updates occur.
+  //
+  // The HTTP response codes specific to this call are:
+  //
+  // * 200 OK: update operation was successfully completed.
+  // * 400 Bad Request: the requested update is not valid.
+  // * 403 Forbidden: framework is not authorized to use some entities
+  //   requested by the update (e.g. not authorized to use some of the
+  //   supplied roles).
+  // * 409 Conflict: framework disappeared while this call was being processed
+  //   (example: the framework was removed by a concurrent TEARDOWN call).
+  //
+  message UpdateFramework {
+    required FrameworkInfo framework_info = 1;
+
+    // List of suppressed roles for which the framework does not wish to be
+    // offered resources. The framework can decide to suppress all or a subset
+    // of roles provided in the new `framework_info`.
+    repeated string suppressed_roles = 2;
+  }
+
   // Identifies who generated this call. Master assigns a framework id
   // when a new scheduler subscribes for the first time. Once assigned,
   // the scheduler must set the 'framework_id' here and within its
@@ -509,6 +538,7 @@ message Call {
   optional Message message = 10;
   optional Request request = 11;
   optional Suppress suppress = 16;
+  optional UpdateFramework update_framework = 19;
 }
 
 /**

Reply via email to