You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by me...@apache.org on 2016/03/13 12:43:32 UTC

[1/2] mesos git commit: Improved docs for dynamic weights.

Repository: mesos
Updated Branches:
  refs/heads/master 477b9ab8a -> 292ed34e8


Improved docs for dynamic weights.

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


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

Branch: refs/heads/master
Commit: 77a9755693d9d8bce9fd7f69ea1de41c4a6a1c0c
Parents: 477b9ab
Author: Neil Conway <ne...@gmail.com>
Authored: Sun Mar 13 04:33:16 2016 -0700
Committer: Adam B <ad...@mesosphere.io>
Committed: Sun Mar 13 04:33:16 2016 -0700

----------------------------------------------------------------------
 docs/configuration.md | 10 +++++-----
 docs/roles.md         | 10 ++++++----
 docs/ssl.md           |  2 +-
 docs/weights.md       | 35 ++++++++++++++++++-----------------
 src/master/flags.cpp  | 11 +++++------
 5 files changed, 35 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/77a97556/docs/configuration.md
----------------------------------------------------------------------
diff --git a/docs/configuration.md b/docs/configuration.md
index f6e8402..739d4ff 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -758,11 +758,11 @@ Directory path of the webui files/assets (default: /usr/local/share/mesos/webui)
     --weights=VALUE
   </td>
   <td>
-A comma-separated list of role/weight pairs
-of the form <code>role=weight,role=weight</code>. Weights
-are used to indicate forms of priority. This flag is deprecated,
-and instead, after the Mesos master quorum is achieved, an operator
-can send an update weights request to do a batch configuration for weights.
+A comma-separated list of role/weight pairs of the form
+<code>role=weight,role=weight</code>. Weights can be used to control the
+relative share of cluster resources that is offered to different roles. This
+flag is deprecated. Instead, operators should configure weights dynamically
+using the <code>/weights</code> HTTP endpoint.
   </td>
 </tr>
 <tr>

http://git-wip-us.apache.org/repos/asf/mesos/blob/77a97556/docs/roles.md
----------------------------------------------------------------------
diff --git a/docs/roles.md b/docs/roles.md
index 65d6ddf..344a0e3 100644
--- a/docs/roles.md
+++ b/docs/roles.md
@@ -119,10 +119,12 @@ resources. In particular, this implementation of DRF first identifies which
 _role_ is furthest below its fair share of the role's dominant resource. Each of
 the frameworks in that role are then offered additional resources in turn.
 
-The resource allocation process can be customized by assigning _weights_ to
-roles: a role with a weight of 2 will be allocated twice the fair share of a
-role with a weight of 1. Weights are optional, and can be specified via the
-`--weights` command-line flag when starting the Mesos master.
+The resource allocation process can be customized by assigning
+_[weights](weights.md)_ to roles: a role with a weight of 2 will be allocated
+twice the fair share of a role with a weight of 1. By default, every role has a
+weight of 1. Weights can be configured using the
+[/weights](endpoints/master/weights.md) operator endpoint, or else using the
+deprecated `--weights` command-line flag when starting the Mesos master.
 
 
 ## Role vs. Principal

http://git-wip-us.apache.org/repos/asf/mesos/blob/77a97556/docs/ssl.md
----------------------------------------------------------------------
diff --git a/docs/ssl.md b/docs/ssl.md
index 6c5aec3..d0fcd53 100644
--- a/docs/ssl.md
+++ b/docs/ssl.md
@@ -98,7 +98,7 @@ SSL_ENABLED=true SSL_SUPPORT_DOWNGRADE=true SSL_KEY_FILE=<path-to-your-private-k
 // Restart each component WITHOUT downgrade support (master, slave, framework):
 SSL_ENABLED=true SSL_SUPPORT_DOWNGRADE=false SSL_KEY_FILE=<path-to-your-private-key> SSL_CERT_FILE=<path-to-your-certificate> <Any other SSL_* environment variables you may choose> <your-component (e.g. bin/master.sh)> <your-flags>
 ~~~
-You need to make sure that executors are able to access the SSL environment variables and the files these variables are referring to. Executors can be provided with the environment variables by specifying them in `CommandInfo.environment` or by using the slave's `--executor_environment_variables` command line flag. If the slave and the executors are running in separate containers, `ContainerInfo.volumes` can be used to provide SSL files from the host to the executor's container.
+Executors must be able to access the SSL environment variables and the files referred to by those variables. Environment variables can be provided to an executor by specifying `CommandInfo.environment` or by using the slave's `--executor_environment_variables` command line flag. If the slave and the executor are running in separate containers, `ContainerInfo.volumes` can be used to mount SSL files from the host into the executor's container.
 
 The end state is a cluster that is only communicating with SSL.
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/77a97556/docs/weights.md
----------------------------------------------------------------------
diff --git a/docs/weights.md b/docs/weights.md
index dec2ddd..a942513 100644
--- a/docs/weights.md
+++ b/docs/weights.md
@@ -4,8 +4,8 @@ layout: documentation
 
 # Weights
 
-In Mesos, __weights__ are used to indicate forms of priority
-among [roles](roles.md).
+In Mesos, __weights__ can be used to control the relative share of cluster
+resources that is offered to different [roles](roles.md).
 
 In Mesos 0.28 and earlier, weights can only be configured by specifying
 the `--weights` command-line flag when starting the Mesos master. If a
@@ -13,14 +13,15 @@ role does not have a weight specified in the `--weights` flag, then the default
 value (1.0) will be used. Weights cannot be changed without updating the flag
 and restarting all Mesos masters.
 
-In Mesos 0.29, a new endpoint `/weights` is introduced so an operator can
-update weights at runtime. The `--weights` command-line flag is deprecated.
+Mesos 0.29 contains a [/weights](endpoints/master/weights.md) operator endpoint
+that allows weights to be changed at runtime. The `--weights` command-line flag
+is deprecated.
 
 # Operator HTTP Endpoint
 
 The master `/weights` HTTP endpoint enables operators to update weights. The
-endpoint currently offers a REST-like interface and only supports an update
-request with PUT.
+endpoint currently offers a REST-like interface and only supports update
+requests using PUT.
 
 The endpoint can optionally use authentication and authorization. See the
 [authentication guide](authentication.md) for details.
@@ -35,26 +36,26 @@ for `role2`, the operator can use the following `jsonMessageBody`:
 
         [
           {
-            "weight": 2.0,
-            "role": "role1"
+            "role": "role1",
+            "weight": 2.0
           },
           {
-            "weight": 3.5,
-            "role": "role2"
+            "role": "role2",
+            "weight": 3.5
           }
         ]
 
-An update request is always valid when master is configured with implicit
-roles. However if the master is configured with an explicit [role whitelist](roles.md)
-the request is only valid when all specified roles exist in the `whitelist`.
+If the master is configured with an explicit [role whitelist](roles.md), the
+request is only valid if all specified roles exist in the role whitelist.
 
-Weights are now persisted in the registry on cluster bootstrap and after any updates.
-Once the weights are persisted in the registry, any Mesos master that subsequently starts
-with `--weights` still specified will warn and use the registry value instead.
+Weights are now persisted in the registry on cluster bootstrap and after any
+updates.  Once the weights are persisted in the registry, any Mesos master that
+subsequently starts with `--weights` still specified will emit a warning and use
+the registry value instead.
 
 The operator will receive one of the following HTTP response codes:
 
 * `200 OK`: Success (the update request was successful).
-* `400 BadRequest`: Invalid arguments (e.g. invalid JSON, non-positive weights).
+* `400 BadRequest`: Invalid arguments (e.g., invalid JSON, non-positive weights).
 * `401 Unauthorized`: Unauthenticated request.
 * `403 Forbidden`: Unauthorized request.

http://git-wip-us.apache.org/repos/asf/mesos/blob/77a97556/src/master/flags.cpp
----------------------------------------------------------------------
diff --git a/src/master/flags.cpp b/src/master/flags.cpp
index 0d9c21f..e6fea64 100644
--- a/src/master/flags.cpp
+++ b/src/master/flags.cpp
@@ -192,12 +192,11 @@ mesos::internal::master::Flags::Flags()
 
   add(&Flags::weights,
       "weights",
-      "A comma-separated list of role/weight pairs\n"
-      "of the form `role=weight,role=weight`. Weights\n"
-      "are used to indicate forms of priority. This flag is deprecated;\n"
-      "if it is not specified, after the Mesos master quorum is achieved,\n"
-      "an operator can send an update weights request to do a batch\n"
-      "configuration for weights.");
+      "A comma-separated list of role/weight pairs of the form\n"
+      "`role=weight,role=weight`. Weights can be used to control the\n"
+      "relative share of cluster resources that is offered to different\n"
+      "roles. This flag is deprecated. Instead, operators should configure\n"
+      "weights dynamically using the `/weights` HTTP endpoint.");
 
   // TODO(adam-mesos): Deprecate --authenticate for --authenticate_frameworks.
   // See MESOS-4386 for details.


[2/2] mesos git commit: Added executable permissions to generate-endpoint-help.py.

Posted by me...@apache.org.
Added executable permissions to generate-endpoint-help.py.


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

Branch: refs/heads/master
Commit: 292ed34e8ecd261c0752761da5fcf7620dd94845
Parents: 77a9755
Author: Adam B <ad...@mesosphere.io>
Authored: Sun Mar 13 04:42:05 2016 -0700
Committer: Adam B <ad...@mesosphere.io>
Committed: Sun Mar 13 04:42:05 2016 -0700

----------------------------------------------------------------------
 support/generate-endpoint-help.py | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/292ed34e/support/generate-endpoint-help.py
----------------------------------------------------------------------
diff --git a/support/generate-endpoint-help.py b/support/generate-endpoint-help.py
old mode 100644
new mode 100755