You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2016/03/16 01:40:23 UTC

[1/2] mesos git commit: Improved documentation for multiple disks.

Repository: mesos
Updated Branches:
  refs/heads/master c7602b202 -> 5b2a34c50


Improved documentation for multiple disks.

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


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

Branch: refs/heads/master
Commit: f6069ce0fe87f0b36dc46f1b6378f9e973cfe9c0
Parents: c7602b2
Author: Neil Conway <ne...@gmail.com>
Authored: Tue Mar 15 17:39:47 2016 -0700
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Mar 15 17:40:07 2016 -0700

----------------------------------------------------------------------
 docs/multiple-disk.md | 58 +++++++++++++++++++++++++++++++---------------
 1 file changed, 39 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/f6069ce0/docs/multiple-disk.md
----------------------------------------------------------------------
diff --git a/docs/multiple-disk.md b/docs/multiple-disk.md
index f0fca25..5cdce26 100644
--- a/docs/multiple-disk.md
+++ b/docs/multiple-disk.md
@@ -10,6 +10,8 @@ creating [persistent volumes](persistent-volume.md) frameworks can decide
 whether to use specific disks by examining the `source` field on the disk
 resources offered.
 
+## Types of Disk Resources
+
 `Disk` resources come in three forms:
 
 * A `Root` disk is presented by not having the `source` set in `DiskInfo`.
@@ -21,38 +23,54 @@ resources offered.
   mount point used to store data.
 
 Operators can use the JSON-formated `--resources` option on the agent to provide
-these different kind of disk resources on agent start-up.
+these different kind of disk resources on agent start-up. Example resource
+values in JSON format can be found below. By default (if `--resources` is not
+specified), the Mesos agent will only make the root disk available to the
+cluster.
 
-#### `Root` disk
+### `Root` disk
 
 A `Root` disk is the basic disk resource in Mesos. It usually maps to the
 storage on the main operating system drive that the operator has presented to
 the agent. Data is mapped into the `work_dir` of the agent.
 
+An example resources value for a root disk is shown below. Note that the
+operator could optionally specify a `role` for the disk, which would result in
+[statically reserving](reservations.md) the disk for a single [role](roles.md).
+
         {
           "resources" : [
             {
               "name" : "disk",
               "type" : "SCALAR",
-              "scalar" : { "value" : 2048 },
-              "role" : <framework_role>
+              "scalar" : { "value" : 2048 }
             }
           ]
         }
 
-#### `Path` disks
+### `Path` disks
 
 A `Path` disk is an auxiliary disk resource provided by the operator. This can
-can be carved up into smaller chunks by accepting less than the total amount as
-frameworks see fit. Common uses for this kind of disk are extra logging space,
-file archives or caches, or other non performance-critical applications.
-Operators can present extra disks on their agents as `Path` disks simply by
-creating a directory and making that the `root` of the `Path` in `DiskInfo`'s
-`source`.
+can be carved up into smaller chunks by creating persistent volumes that use
+less than the total available space on the disk. Common uses for this kind of
+disk are extra logging space, file archives or caches, or other non
+performance-critical applications.  Operators can present extra disks on their
+agents as `Path` disks simply by creating a directory and making that the `root`
+of the `Path` in `DiskInfo`'s `source`.
 
 `Path` disks are also useful for mocking up a multiple disk environment by
 creating some directories on the operating system drive. This should only be
-done in a testing or staging environment.
+done in a testing or staging environment. Note that creating multiple `Path`
+disks on the same filesystem requires statically partitioning the available disk
+space. For example, suppose a 10GB storage device is mounted to `/foo` and the
+Mesos agent is configured with two `Path` disks at `/foo/disk1` and
+`/foo/disk2`. To avoid the risk of running out of space on the device, `disk1`
+and `disk2` should be configured (when the Mesos agent is started) to use at
+most 10GB of disk space in total.
+
+An example resources value for a `Path` disk is shown below. Note that the
+operator could optionally specify a `role` for the disk, which would result in
+[statically reserving](reservations.md) the disk for a single [role](roles.md).
 
         {
           "resources" : [
@@ -60,7 +78,6 @@ done in a testing or staging environment.
               "name" : "disk",
               "type" : "SCALAR",
               "scalar" : { "value" : 2048 },
-              "role" : <framework_role>,
               "disk" : {
                 "source" : {
                   "type" : "PATH",
@@ -71,7 +88,7 @@ done in a testing or staging environment.
           ]
         }
 
-#### `Mount` disks
+### `Mount` disks
 
 A `Mount` disk is an auxiliary disk resource provided by the operator. This
 __cannot__ be carved up into smaller chunks by frameworks. This lack of
@@ -80,10 +97,10 @@ have exclusive access to the disk device. Common uses for this kind of disk
 include database storage, write-ahead logs, or other performance-critical
 applications.
 
-Another requirement of `Mount` disks is that (on Linux) they map to a `mount`
-point in the `/proc/mounts` table. Operators should mount a physical disk with
-their preferred file system and provide the mount point as the `root` of the
-`Mount` in `DiskInfo`'s `source`.
+On Linux, `Mount` disks must map to a `mount` point in the `/proc/mounts`
+table. Operators should mount a physical disk with their preferred file system
+and provide the mount point as the `root` of the `Mount` in `DiskInfo`'s
+`source`.
 
 Aside from the performance advantages of `Mount` disks, applications running on
 them should be able to rely on disk errors when they attempt to exceed the
@@ -91,13 +108,16 @@ capacity of the volume. This holds true as long as the file system in use
 correctly propagates these errors. Due to this expectation, the `posix/disk`
 isolation is disabled for `Mount` disks.
 
+An example resources value for a `Mount` disk is shown below. Note that the
+operator could optionally specify a `role` for the disk, which would result in
+[statically reserving](reservations.md) the disk for a single [role](roles.md).
+
         {
           "resources" : [
             {
               "name" : "disk",
               "type" : "SCALAR",
               "scalar" : { "value" : 2048 },
-              "role" : <framework_role>,
               "disk" : {
                 "source" : {
                   "type" : "MOUNT",


[2/2] mesos git commit: Improved grammar in `--help` output for master and agent.

Posted by jo...@apache.org.
Improved grammar in `--help` output for master and agent.

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


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

Branch: refs/heads/master
Commit: 5b2a34c505212aeb48542b3bd29ab05acc678842
Parents: f6069ce
Author: Neil Conway <ne...@gmail.com>
Authored: Tue Mar 15 17:39:54 2016 -0700
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Mar 15 17:40:12 2016 -0700

----------------------------------------------------------------------
 docs/configuration.md | 16 ++++++++--------
 src/master/main.cpp   | 12 ++++++------
 src/slave/flags.cpp   |  6 +++---
 src/slave/main.cpp    | 12 ++++++------
 4 files changed, 23 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5b2a34c5/docs/configuration.md
----------------------------------------------------------------------
diff --git a/docs/configuration.md b/docs/configuration.md
index 739d4ff..d10fa2e 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -51,9 +51,9 @@ be found by running the binary with the flag `--help`, for example
     --advertise_ip=VALUE
   </td>
   <td>
-IP address advertised to reach mesos master/slave.
-Mesos master/slave does not bind using this IP address.
-However, this IP address may be used to access Mesos master/slave.
+IP address advertised to reach this Mesos master/slave.
+The master/slave does not bind to this IP address.
+However, this IP address may be used to access this master/slave.
   </td>
 </tr>
 <tr>
@@ -61,8 +61,8 @@ However, this IP address may be used to access Mesos master/slave.
     --advertise_port=VALUE
   </td>
   <td>
-Port advertised to reach mesos master/slave (along with
-<code>advertise_ip</code>). Mesos master/slave does not bind using this port.
+Port advertised to reach this Mesos master/slave (along with
+<code>advertise_ip</code>). The master/slave does not bind using this port.
 However, this port (along with <code>advertise_ip</code>) may be used to
 access Mesos master/slave.
   </td>
@@ -1086,7 +1086,7 @@ removing docker tasks launched by other slaves.
     --docker_mesos_image=VALUE
   </td>
   <td>
-The docker image used to launch this mesos slave instance.
+The Docker image used to launch this Mesos slave instance.
 If an image is specified, the docker containerizer assumes the slave
 is running in a docker container, and launches executors with
 docker containers in order to recover them when the slave restarts and
@@ -1293,8 +1293,8 @@ launcher if it's running as root on Linux.
     --launcher_dir=VALUE
   </td>
   <td>
-Directory path of Mesos binaries. Mesos would find health-check,
-fetcher, containerizer and executor binary files under this
+Directory path of Mesos binaries. Mesos looks for the health-check,
+fetcher, containerizer, and executor binary files under this
 directory. (default: /usr/local/libexec/mesos)
   </td>
 </tr>

http://git-wip-us.apache.org/repos/asf/mesos/blob/5b2a34c5/src/master/main.cpp
----------------------------------------------------------------------
diff --git a/src/master/main.cpp b/src/master/main.cpp
index 7c1656b..61210d9 100644
--- a/src/master/main.cpp
+++ b/src/master/main.cpp
@@ -137,17 +137,17 @@ int main(int argc, char** argv)
   Option<string> advertise_ip;
   flags.add(&advertise_ip,
             "advertise_ip",
-            "IP address advertised to reach mesos master.\n"
-            "Mesos master does not bind using this IP address.\n"
-            "However, this IP address may be used to access Mesos master.");
+            "IP address advertised to reach this Mesos master.\n"
+            "The master does not bind using this IP address.\n"
+            "However, this IP address may be used to access this master.");
 
   Option<string> advertise_port;
   flags.add(&advertise_port,
             "advertise_port",
-            "Port advertised to reach mesos master (along with\n"
-            "`advertise_ip`). Mesos master does not bind using this port.\n"
+            "Port advertised to reach Mesos master (along with\n"
+            "`advertise_ip`). The master does not bind to this port.\n"
             "However, this port (along with `advertise_ip`) may be used to\n"
-            "access Mesos master.");
+            "access this master.");
 
   Option<string> zk;
   flags.add(&zk,

http://git-wip-us.apache.org/repos/asf/mesos/blob/5b2a34c5/src/slave/flags.cpp
----------------------------------------------------------------------
diff --git a/src/slave/flags.cpp b/src/slave/flags.cpp
index 4d10818..b77afa9 100644
--- a/src/slave/flags.cpp
+++ b/src/slave/flags.cpp
@@ -177,8 +177,8 @@ mesos::internal::slave::Flags::Flags()
 
   add(&Flags::launcher_dir, // TODO(benh): This needs a better name.
       "launcher_dir",
-      "Directory path of Mesos binaries. Mesos would find health-check,\n"
-      "fetcher, containerizer and executor binary files under this\n"
+      "Directory path of Mesos binaries. Mesos looks for the health-check,\n"
+      "fetcher, containerizer, and executor binary files under this\n"
       "directory.",
       PKGLIBEXECDIR);
 
@@ -482,7 +482,7 @@ mesos::internal::slave::Flags::Flags()
 
   add(&Flags::docker_mesos_image,
       "docker_mesos_image",
-      "The docker image used to launch this mesos slave instance.\n"
+      "The Docker image used to launch this Mesos slave instance.\n"
       "If an image is specified, the docker containerizer assumes the slave\n"
       "is running in a docker container, and launches executors with\n"
       "docker containers in order to recover them when the slave restarts and\n"

http://git-wip-us.apache.org/repos/asf/mesos/blob/5b2a34c5/src/slave/main.cpp
----------------------------------------------------------------------
diff --git a/src/slave/main.cpp b/src/slave/main.cpp
index e3a4d13..33a1af8 100644
--- a/src/slave/main.cpp
+++ b/src/slave/main.cpp
@@ -112,17 +112,17 @@ int main(int argc, char** argv)
   Option<string> advertise_ip;
   flags.add(&advertise_ip,
             "advertise_ip",
-            "IP address advertised to reach mesos slave.\n"
-            "Mesos slave does not bind using this IP address.\n"
-            "However, this IP address may be used to access Mesos slave.");
+            "IP address advertised to reach this Mesos slave.\n"
+            "The slave does not bind to this IP address.\n"
+            "However, this IP address may be used to access this slave.");
 
   Option<string> advertise_port;
   flags.add(&advertise_port,
             "advertise_port",
-            "Port advertised to reach mesos slave (along with\n"
-            "`advertise_ip`). Mesos slave does not bind using this port.\n"
+            "Port advertised to reach this Mesos slave (along with\n"
+            "`advertise_ip`). The slave does not bind to this port.\n"
             "However, this port (along with `advertise_ip`) may be used to\n"
-            "access Mesos slave.");
+            "access this slave.");
 
   Option<string> master;
   flags.add(&master,