You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mz...@apache.org on 2019/08/05 21:21:10 UTC

[mesos] branch master updated (e1176c4 -> 6ce1010)

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

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


    from e1176c4  Renamed cmake parameter for parallel test execution.
     new 1186df3  Updated operator HTTP API documentation regarding `GET_QUOTA`.
     new e40889b  Updated operator HTTP API documentation regarding `UPDATE_QUOTA`.
     new 6ce1010  Marked `SET_QUOTA` and `REMOVE_QUOTA` as deprecated.

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/operator-http-api.md            | 119 +++++++++++++++--------------------
 include/mesos/master/master.proto    |  29 +++------
 include/mesos/v1/master/master.proto |  29 +++------
 3 files changed, 69 insertions(+), 108 deletions(-)


[mesos] 03/03: Marked `SET_QUOTA` and `REMOVE_QUOTA` as deprecated.

Posted by mz...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6ce10107346d65ea12a60667dd222096a042b938
Author: Meng Zhu <mz...@mesosphere.io>
AuthorDate: Tue Jul 30 17:50:55 2019 -0700

    Marked `SET_QUOTA` and `REMOVE_QUOTA` as deprecated.
    
    These are deprecated in favor of `UPDATE_QUOTA`.
    
    Review: https://reviews.apache.org/r/71214
---
 include/mesos/master/master.proto    | 29 ++++++++++-------------------
 include/mesos/v1/master/master.proto | 29 ++++++++++-------------------
 2 files changed, 20 insertions(+), 38 deletions(-)

diff --git a/include/mesos/master/master.proto b/include/mesos/master/master.proto
index 153be68..8386bd6 100644
--- a/include/mesos/master/master.proto
+++ b/include/mesos/master/master.proto
@@ -95,18 +95,14 @@ message Call {
     REACTIVATE_AGENT = 39; // See 'ReactivateAgent' below.
 
     GET_QUOTA = 28;
-
-    // EXPERIMENTAL DO NOT USE.
-    //
-    // This feature is not implementation complete.
-    //
-    // TODO(bmahler): Remove this when complete and deprecate the
-    // `REMOVE_QUOTA` and `SET_QUOTA` calls in favor of this. Be
-    // sure to document what's different for users.
     UPDATE_QUOTA = 36;       // See 'UpdateQuota' below.
 
-    SET_QUOTA = 29;          // See 'SetQuota' below.
-    REMOVE_QUOTA = 30;       // See 'RemoveQuota' below.
+    // `SET_QUOTA` and `REMOVE_QUOTA` are deprecated in favor
+    // of `UPDATE_QUOTA`. To reset a role's quota back to the default
+    // (no guarantees and no limits), simply update the role's quota
+    // with empty guarantees and limits.
+    SET_QUOTA = 29 [deprecated = true];
+    REMOVE_QUOTA = 30 [deprecated = true];
 
     TEARDOWN = 31;       // See 'Teardown' below.
 
@@ -292,14 +288,12 @@ message Call {
     repeated quota.QuotaConfig quota_configs = 2;
   }
 
-  // Sets the quota for resources to be used by a particular role.
-  //
-  // TODO(bmahler): Deprecate this in favor of `UpdateQuota`.
+  // Deprecated in favor of `UpdateQuota`.
   message SetQuota {
     required quota.QuotaRequest quota_request = 1;
   }
 
-  // TODO(bmahler): Deprecate this in favor of `UpdateQuota`.
+  // Deprecated in favor of `UpdateQuota`.
   message RemoveQuota {
     required string role = 1;
   }
@@ -348,11 +342,8 @@ message Call {
   optional Teardown teardown = 16;
   optional MarkAgentGone mark_agent_gone = 17;
 
-  // TODO(bmahler): Deprecate in favor of `UPDATE_QUOTA`.
-  optional SetQuota set_quota = 14;
-
-  // TODO(bmahler): Deprecate in favor of `UPDATE_QUOTA`.
-  optional RemoveQuota remove_quota = 15;
+  optional SetQuota set_quota = 14 [deprecated = true];
+  optional RemoveQuota remove_quota = 15 [deprecated = true];
 }
 
 
diff --git a/include/mesos/v1/master/master.proto b/include/mesos/v1/master/master.proto
index 4906b94..893162d 100644
--- a/include/mesos/v1/master/master.proto
+++ b/include/mesos/v1/master/master.proto
@@ -96,18 +96,14 @@ message Call {
     REACTIVATE_AGENT = 39; // See 'ReactivateAgent' below.
 
     GET_QUOTA = 28;
-
-    // EXPERIMENTAL DO NOT USE.
-    //
-    // This feature is not implementation complete.
-    //
-    // TODO(bmahler): Remove this when complete and deprecate the
-    // `REMOVE_QUOTA` and `SET_QUOTA` calls in favor of this. Be
-    // sure to document what's different for users.
     UPDATE_QUOTA = 36;       // See 'UpdateQuota' below.
 
-    SET_QUOTA = 29;          // See 'SetQuota' below.
-    REMOVE_QUOTA = 30;       // See 'RemoveQuota' below.
+    // `SET_QUOTA` and `REMOVE_QUOTA` are deprecated in favor
+    // of `UPDATE_QUOTA`. To reset a role's quota back to the default
+    // (no guarantees and no limits), simply update the role's quota
+    // with empty guarantees and limits.
+    SET_QUOTA = 29 [deprecated = true];
+    REMOVE_QUOTA = 30 [deprecated = true];
 
     TEARDOWN = 31;       // See 'Teardown' below.
 
@@ -293,14 +289,12 @@ message Call {
     repeated quota.QuotaConfig quota_configs = 2;
   }
 
-  // Sets the quota for resources to be used by a particular role.
-  //
-  // TODO(bmahler): Deprecate this in favor of `UpdateQuota`.
+  // Deprecated in favor of `UpdateQuota`.
   message SetQuota {
     required quota.QuotaRequest quota_request = 1;
   }
 
-  // TODO(bmahler): Deprecate this in favor of `UpdateQuota`.
+  // Deprecated in favor of `UpdateQuota`.
   message RemoveQuota {
     required string role = 1;
   }
@@ -349,11 +343,8 @@ message Call {
   optional Teardown teardown = 16;
   optional MarkAgentGone mark_agent_gone = 17;
 
-  // TODO(bmahler): Deprecate in favor of `UPDATE_QUOTA`.
-  optional SetQuota set_quota = 14;
-
-  // TODO(bmahler): Deprecate in favor of `UPDATE_QUOTA`.
-  optional RemoveQuota remove_quota = 15;
+  optional SetQuota set_quota = 14 [deprecated = true];
+  optional RemoveQuota remove_quota = 15 [deprecated = true];
 }
 
 


[mesos] 01/03: Updated operator HTTP API documentation regarding `GET_QUOTA`.

Posted by mz...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 1186df321ffae1272cfaf1d5f539c9305777defe
Author: Meng Zhu <mz...@mesosphere.io>
AuthorDate: Tue Jul 30 17:21:10 2019 -0700

    Updated operator HTTP API documentation regarding `GET_QUOTA`.
    
    The deprecated guarantee, principal and role fields are
    now hidden.
    
    Review: https://reviews.apache.org/r/71212
---
 docs/operator-http-api.md | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/docs/operator-http-api.md b/docs/operator-http-api.md
index ddf29e9..7aaeff3 100644
--- a/docs/operator-http-api.md
+++ b/docs/operator-http-api.md
@@ -2423,26 +2423,27 @@ Content-Type: application/json
     "status": {
       "infos": [
         {
-          "guarantee": [
+          "configs" : [
             {
-              "name": "cpus",
-              "role": "*",
-              "scalar": {
-                "value": 1.0
-              },
-              "type": "SCALAR"
-            },
-            {
-              "name": "mem",
-              "role": "*",
-              "scalar": {
-                "value": 512.0
+              "role": "dev",
+              "guarantees": {
+                "cpus": {
+                  "value": 1.0
+                },
+                "mem": {
+                  "value": 1024.0
+                }
               },
-              "type": "SCALAR"
+              "limits": {
+                "cpus": {
+                  "value": 2.0
+                },
+                "mem": {
+                  "value": 2048.0
+                }
+              }
             }
-          ],
-          "principal": "my-principal",
-          "role": "role1"
+          ]
         }
       ]
     }


[mesos] 02/03: Updated operator HTTP API documentation regarding `UPDATE_QUOTA`.

Posted by mz...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e40889b54163a86813edbdc519a655ef610fe946
Author: Meng Zhu <mz...@mesosphere.io>
AuthorDate: Tue Jul 30 17:31:40 2019 -0700

    Updated operator HTTP API documentation regarding `UPDATE_QUOTA`.
    
    The deprecated calls `SET_QUOTA` and `REMOVE_QUOTA` are
    now hidden.
    
    Review: https://reviews.apache.org/r/71213
---
 docs/operator-http-api.md | 84 +++++++++++++++++------------------------------
 1 file changed, 31 insertions(+), 53 deletions(-)

diff --git a/docs/operator-http-api.md b/docs/operator-http-api.md
index 7aaeff3..1830816 100644
--- a/docs/operator-http-api.md
+++ b/docs/operator-http-api.md
@@ -2452,12 +2452,15 @@ Content-Type: application/json
 
 ```
 
-### SET_QUOTA
+### UPDATE_QUOTA
 
-This call sets the quota for resources to be used by a particular role.
+This call updates the quota for the specified role(s).
+These configurations are applied in an all-or-nothing manner.
+To reset a role's quota back to the default (no guarantees and no limits),
+simply update its quota with empty guarantees and limits fields.
 
 ```
-SET_QUOTA HTTP Request (JSON):
+UPDATE_QUOTA HTTP Request (JSON):
 
 POST /api/v1  HTTP/1.1
 
@@ -2466,64 +2469,39 @@ Content-Type: application/json
 Accept: application/json
 
 {
-  "type": "SET_QUOTA",
-  "set_quota": {
-    "quota_request": {
-      "force": true,
-      "guarantee": [
-        {
-          "name": "cpus",
-          "role": "*",
-          "scalar": {
-            "value": 1.0
+   "type": "UPDATE_QUOTA",
+   "update_quota": {
+      "force": false,
+      "quota_configs": [
+         {
+          "role": "dev",
+          "guarantees": {
+            "cpus": { "value": 1.0 },
+            "mem": { "value": 1024.0 }
           },
-          "type": "SCALAR"
+          "limits": {
+            "cpus": { "value": 2.0 },
+            "mem": { "value": 2048.0 }
+          }
         },
         {
-          "name": "mem",
-          "role": "*",
-          "scalar": {
-            "value": 512.0
+          "role": "test",
+          "guarantees": {
+            "cpus": { "value": 1.0 },
+            "mem": { "value": 1024.0 }
           },
-          "type": "SCALAR"
+          "limits": {
+            "cpus": { "value": 2.0 },
+            "mem": {"value": 2048.0 }
+          }
         }
-      ],
-      "role": "role1"
-    }
-  }
-}
-
-
-SET_QUOTA HTTP Response:
-
-HTTP/1.1 202 Accepted
-
-```
-
-### REMOVE_QUOTA
-
-This call removes the quota for a particular role.
-
-```
-REMOVE_QUOTA HTTP Request (JSON):
-
-POST /api/v1  HTTP/1.1
-
-Host: masterhost:5050
-Content-Type: application/json
-Accept: application/json
-
-{
-  "type": "REMOVE_QUOTA",
-  "remove_quota": {
-    "role": "role1"
-  }
+      ]
+   }
 }
 
+UPDATE_QUOTA HTTP Response:
 
-REMOVE_QUOTA HTTP Response:
-
-HTTP/1.1 202 Accepted
+HTTP/1.1 200 OK
 
 ```