[1/2] mesos git commit: Improved HTTP API docs.

2016-08-03 Thread anand
Repository: mesos
Updated Branches:
  refs/heads/master 08d07248e -> 853821caf


Improved HTTP API docs.

Clarify that HTTP APIs are now considered stable and give some
background on how the old and new APIs compare.

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


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

Branch: refs/heads/master
Commit: 05da9ba06b48f19ad093e2ab66cb1fc7a93c0cb7
Parents: 08d0724
Author: Neil Conway 
Authored: Wed Aug 3 19:57:03 2016 -0700
Committer: Anand Mazumdar 
Committed: Wed Aug 3 19:57:03 2016 -0700

--
 docs/executor-http-api.md  | 21 -
 docs/scheduler-http-api.md | 22 +-
 2 files changed, 41 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/05da9ba0/docs/executor-http-api.md
--
diff --git a/docs/executor-http-api.md b/docs/executor-http-api.md
index fb70f75..50b4cb4 100644
--- a/docs/executor-http-api.md
+++ b/docs/executor-http-api.md
@@ -5,7 +5,26 @@ layout: documentation
 
 # Executor HTTP API
 
-Mesos 0.28.0 added **experimental** support for V1 Executor HTTP API.
+A Mesos executor can be built in two different ways:
+
+1. By using the `ExecutorDriver` C++ interface. The `ExecutorDriver` handles 
the
+details of communicating with the Mesos agent. Executor developers implement
+custom executor logic by registering callbacks with the `ExecutorDriver` for
+significant events, such as when a new task launch request is received. Because
+the `ExecutorDriver` interface is written in C++, this typically requires that
+executor developers either use C++ or use a C++ binding to their language of
+choice (e.g., JNI when using JVM-based languages).
+
+2. By using the new HTTP API. This allows Mesos executors to be developed
+without using C++ or a native client library; instead, a custom executor
+interacts with the Mesos agent via HTTP requests, as described below. Although
+it is theoretically possible to use the HTTP executor API "directly" (e.g., by
+using a generic HTTP library), most executor developers should use a library 
for
+their language of choice that manages the details of the HTTP API; see the
+document on [HTTP API client libraries](api-client-libraries.md) for a list.
+
+The v1 Executor HTTP API was introduced in Mesos 0.28.0. As of Mesos 1.0, it is
+considered stable and is the recommended way to develop new Mesos executors.
 
 
 ## Overview

http://git-wip-us.apache.org/repos/asf/mesos/blob/05da9ba0/docs/scheduler-http-api.md
--
diff --git a/docs/scheduler-http-api.md b/docs/scheduler-http-api.md
index 504872e..a27965a 100644
--- a/docs/scheduler-http-api.md
+++ b/docs/scheduler-http-api.md
@@ -5,7 +5,27 @@ layout: documentation
 
 # Scheduler HTTP API
 
-Mesos 0.24.0 added **experimental** support for v1 Scheduler HTTP API.
+A Mesos scheduler can be built in two different ways:
+
+1. By using the `SchedulerDriver` C++ interface. The `SchedulerDriver` handles
+the details of communicating with the Mesos master. Scheduler developers
+implement custom scheduling logic by registering callbacks with the
+`SchedulerDriver` for significant events, such as receiving a new resource 
offer
+or a status update on a task. Because the `SchedulerDriver` interface is 
written
+in C++, this typically requires that scheduler developers either use C++ or use
+a C++ binding to their language of choice (e.g., JNI when using JVM-based
+languages).
+
+2. By using the new HTTP API. This allows Mesos schedulers to be developed
+without using C++ or a native client library; instead, a custom scheduler
+interacts with the Mesos master via HTTP requests, as described below. Although
+it is theoretically possible to use the HTTP scheduler API "directly" (e.g., by
+using a generic HTTP library), most scheduler developers should use a library 
for
+their language of choice that manages the details of the HTTP API; see the
+document on [HTTP API client libraries](api-client-libraries.md) for a list.
+
+The v1 Scheduler HTTP API was introduced in Mesos 0.24.0. As of Mesos 1.0, it 
is
+considered stable and is the recommended way to develop new Mesos schedulers.
 
 
 ## Overview



[2/2] mesos git commit: Fixed typo in comment.

2016-08-03 Thread anand
Fixed typo in comment.

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


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

Branch: refs/heads/master
Commit: 853821cafcca3550b9c7bdaba5262d73869e2ee1
Parents: 05da9ba
Author: Neil Conway 
Authored: Wed Aug 3 19:57:08 2016 -0700
Committer: Anand Mazumdar 
Committed: Wed Aug 3 19:57:08 2016 -0700

--
 include/mesos/scheduler.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/853821ca/include/mesos/scheduler.hpp
--
diff --git a/include/mesos/scheduler.hpp b/include/mesos/scheduler.hpp
index e5de589..423235a 100644
--- a/include/mesos/scheduler.hpp
+++ b/include/mesos/scheduler.hpp
@@ -25,7 +25,7 @@
 #include 
 
 // Mesos scheduler interface and scheduler driver. A scheduler is used
-// to interact with Mesos in order run distributed computations.
+// to interact with Mesos in order to run distributed computations.
 //
 // IF YOU FIND YOURSELF MODIFYING COMMENTS HERE PLEASE CONSIDER MAKING
 // THE SAME MODIFICATIONS FOR OTHER LANGUAGE BINDINGS (e.g., Java:



mesos git commit: Fixed sign comparisons in logrotate module.

2016-08-03 Thread josephwu
Repository: mesos
Updated Branches:
  refs/heads/master c4975c99b -> 08d07248e


Fixed sign comparisons in logrotate module.

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


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

Branch: refs/heads/master
Commit: 08d07248ebc7ab46fceb35a4fe645d2b191433d5
Parents: c4975c9
Author: Joseph Wu 
Authored: Wed Aug 3 17:51:40 2016 -0700
Committer: Joseph Wu 
Committed: Wed Aug 3 17:51:50 2016 -0700

--
 src/slave/container_loggers/lib_logrotate.hpp | 2 +-
 src/slave/container_loggers/logrotate.hpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/08d07248/src/slave/container_loggers/lib_logrotate.hpp
--
diff --git a/src/slave/container_loggers/lib_logrotate.hpp 
b/src/slave/container_loggers/lib_logrotate.hpp
index 6fe38d1..f216548 100644
--- a/src/slave/container_loggers/lib_logrotate.hpp
+++ b/src/slave/container_loggers/lib_logrotate.hpp
@@ -132,7 +132,7 @@ struct Flags : public virtual flags::FlagsBase
 
   static Option validateSize(const Bytes& value)
   {
-if (value.bytes() < os::pagesize()) {
+if (value.bytes() < static_cast(os::pagesize())) {
   return Error(
   "Expected --max_stdout_size and --max_stderr_size of "
   "at least " + stringify(os::pagesize()) + " bytes");

http://git-wip-us.apache.org/repos/asf/mesos/blob/08d07248/src/slave/container_loggers/logrotate.hpp
--
diff --git a/src/slave/container_loggers/logrotate.hpp 
b/src/slave/container_loggers/logrotate.hpp
index f906a16..96697d4 100644
--- a/src/slave/container_loggers/logrotate.hpp
+++ b/src/slave/container_loggers/logrotate.hpp
@@ -57,7 +57,7 @@ struct Flags : public virtual flags::FlagsBase
 "Defaults to 10 MB.  Must be at least 1 (memory) page.",
 Megabytes(10),
 [](const Bytes& value) -> Option {
-  if (value.bytes() < os::pagesize()) {
+  if (value.bytes() < static_cast(os::pagesize())) {
 return Error(
 "Expected --max_size of at least " +
 stringify(os::pagesize()) + " bytes");



mesos git commit: Improved performance in addition and subtraction of resources.

2016-08-03 Thread yan
Repository: mesos
Updated Branches:
  refs/heads/master 9419ed410 -> c4975c99b


Improved performance in addition and subtraction of resources.

Avoid multiple calls to addable and subtractable in the arithmetic
operations in Resources. While adding or subtracting two Resources
objects, check for addable() is done in Resources::add(), and check
for subtractable() is done in Resources::subtract(). Since the
Resource_ class is private and += and -= operators are only called
from within Resources::add() and Resources::subtract(), we do not
need to call addable() or subtractable() again.

This fixes the performance regression introduced by the Resource_ and
now += and -= performance is on a par with the old Resources before
Resource_ was introduced, according to the test
Resources_BENCHMARK_Test.Arithmetic/0.

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


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

Branch: refs/heads/master
Commit: c4975c99b81f7811b3982dd078a87074e517e511
Parents: 9419ed4
Author: Anindya Sinha 
Authored: Wed Aug 3 16:32:52 2016 -0700
Committer: Jiang Yan Xu 
Committed: Wed Aug 3 17:14:04 2016 -0700

--
 include/mesos/resources.hpp|  3 +++
 include/mesos/v1/resources.hpp |  3 +++
 src/common/resources.cpp   | 40 ++---
 src/v1/resources.cpp   | 40 ++---
 4 files changed, 46 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/c4975c99/include/mesos/resources.hpp
--
diff --git a/include/mesos/resources.hpp b/include/mesos/resources.hpp
index 829f39d..bdbe8ea 100644
--- a/include/mesos/resources.hpp
+++ b/include/mesos/resources.hpp
@@ -109,8 +109,11 @@ private:
 // Checks if this Resource_ is a superset of the given Resource_.
 bool contains(const Resource_& that) const;
 
+// The arithmetic operators, viz. += and -= assume that the corresponding
+// Resource objects are addable or subtractable already.
 Resource_& operator+=(const Resource_& that);
 Resource_& operator-=(const Resource_& that);
+
 bool operator==(const Resource_& that) const;
 bool operator!=(const Resource_& that) const;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/c4975c99/include/mesos/v1/resources.hpp
--
diff --git a/include/mesos/v1/resources.hpp b/include/mesos/v1/resources.hpp
index f3c5f31..c05cb63 100644
--- a/include/mesos/v1/resources.hpp
+++ b/include/mesos/v1/resources.hpp
@@ -109,8 +109,11 @@ private:
 // Checks if this Resource_ is a superset of the given Resource_.
 bool contains(const Resource_& that) const;
 
+// The arithmetic operators, viz. += and -= assume that the corresponding
+// Resource objects are addable or subtractable already.
 Resource_& operator+=(const Resource_& that);
 Resource_& operator-=(const Resource_& that);
+
 bool operator==(const Resource_& that) const;
 bool operator!=(const Resource_& that) const;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/c4975c99/src/common/resources.cpp
--
diff --git a/src/common/resources.cpp b/src/common/resources.cpp
index b5d20d6..2470c02 100644
--- a/src/common/resources.cpp
+++ b/src/common/resources.cpp
@@ -859,17 +859,17 @@ bool Resources::Resource_::contains(const Resource_& 
that) const
 
 Resources::Resource_& Resources::Resource_::operator+=(const Resource_& that)
 {
-  if (internal::addable(resource, that.resource)) {
-if (!isShared()) {
-  resource += that.resource;
-} else {
-  // 'addable' makes sure both 'resource' fields are shared and
-  // equal, so we just need to sum up the counters here.
-  CHECK_SOME(sharedCount);
-  CHECK_SOME(that.sharedCount);
+  // This function assumes that the 'resource' fields are addable.
 
-  sharedCount = sharedCount.get() + that.sharedCount.get();
-}
+  if (!isShared()) {
+resource += that.resource;
+  } else {
+// 'addable' makes sure both 'resource' fields are shared and
+// equal, so we just need to sum up the counters here.
+CHECK_SOME(sharedCount);
+CHECK_SOME(that.sharedCount);
+
+sharedCount = sharedCount.get() + that.sharedCount.get();
   }
 
   return *this;
@@ -878,17 +878,17 @@ Resources::Resource_& 
Resources::Resource_::operator+=(const Resource_& that)
 
 Resources::Resource_& Resources::Resource_::operator-=(const Resource_& that)
 {
-  if 

[2/2] mesos git commit: Updated logrotation module to use `os::pagesize()`.

2016-08-03 Thread joris
Updated logrotation module to use `os::pagesize()`.

This gets us closer to compiling on Windows.

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


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

Branch: refs/heads/master
Commit: f538c4bc2b5786875c3eca776234e554dcfb08d6
Parents: df1e231
Author: Joris Van Remoortere 
Authored: Wed Aug 3 18:21:19 2016 -0400
Committer: Joris Van Remoortere 
Committed: Wed Aug 3 18:22:21 2016 -0400

--
 src/slave/container_loggers/lib_logrotate.hpp | 5 +++--
 src/slave/container_loggers/logrotate.cpp | 3 ++-
 src/slave/container_loggers/logrotate.hpp | 6 --
 3 files changed, 9 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/f538c4bc/src/slave/container_loggers/lib_logrotate.hpp
--
diff --git a/src/slave/container_loggers/lib_logrotate.hpp 
b/src/slave/container_loggers/lib_logrotate.hpp
index 193b3ff..6fe38d1 100644
--- a/src/slave/container_loggers/lib_logrotate.hpp
+++ b/src/slave/container_loggers/lib_logrotate.hpp
@@ -26,6 +26,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 #include "slave/container_loggers/logrotate.hpp"
@@ -131,10 +132,10 @@ struct Flags : public virtual flags::FlagsBase
 
   static Option validateSize(const Bytes& value)
   {
-if (value.bytes() < (size_t) sysconf(_SC_PAGE_SIZE)) {
+if (value.bytes() < os::pagesize()) {
   return Error(
   "Expected --max_stdout_size and --max_stderr_size of "
-  "at least " + stringify(sysconf(_SC_PAGE_SIZE)) + " bytes");
+  "at least " + stringify(os::pagesize()) + " bytes");
 }
 
 return None();

http://git-wip-us.apache.org/repos/asf/mesos/blob/f538c4bc/src/slave/container_loggers/logrotate.cpp
--
diff --git a/src/slave/container_loggers/logrotate.cpp 
b/src/slave/container_loggers/logrotate.cpp
index a96cbf1..431bc3c 100644
--- a/src/slave/container_loggers/logrotate.cpp
+++ b/src/slave/container_loggers/logrotate.cpp
@@ -35,6 +35,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -55,7 +56,7 @@ public:
   bytesWritten(0)
   {
 // Prepare a buffer for reading from the `incoming` pipe.
-length = sysconf(_SC_PAGE_SIZE);
+length = os::pagesize();
 buffer = new char[length];
   }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/f538c4bc/src/slave/container_loggers/logrotate.hpp
--
diff --git a/src/slave/container_loggers/logrotate.hpp 
b/src/slave/container_loggers/logrotate.hpp
index 16d9232..f906a16 100644
--- a/src/slave/container_loggers/logrotate.hpp
+++ b/src/slave/container_loggers/logrotate.hpp
@@ -26,6 +26,8 @@
 #include 
 #include 
 
+#include 
+
 
 namespace mesos {
 namespace internal {
@@ -55,10 +57,10 @@ struct Flags : public virtual flags::FlagsBase
 "Defaults to 10 MB.  Must be at least 1 (memory) page.",
 Megabytes(10),
 [](const Bytes& value) -> Option {
-  if (value.bytes() < (size_t) sysconf(_SC_PAGE_SIZE)) {
+  if (value.bytes() < os::pagesize()) {
 return Error(
 "Expected --max_size of at least " +
-stringify(sysconf(_SC_PAGE_SIZE)) + " bytes");
+stringify(os::pagesize()) + " bytes");
   }
   return None();
 });



[2/2] mesos git commit: Added MESOS-5982 to the 1.0.1 CHANGELOG.

2016-08-03 Thread bmahler
Added MESOS-5982 to the 1.0.1 CHANGELOG.


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

Branch: refs/heads/1.0.x
Commit: c2e6cc649ed9144084d0cd69d781bada8ef425be
Parents: e9a97c3
Author: Benjamin Mahler 
Authored: Wed Aug 3 15:50:45 2016 -0700
Committer: Benjamin Mahler 
Committed: Wed Aug 3 15:50:45 2016 -0700

--
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/c2e6cc64/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 389ece7..f3112db 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -12,6 +12,7 @@ All Issues:
   * [MESOS-5943] - Incremental http parsing of URLs leads to decoder error.
   * [MESOS-5945] - NvidiaVolume::create() should check for root before 
creating volume.
   * [MESOS-5959] - All non-root tests fail on GPU machine.
+  * [MESOS-5982] - NvidiaVolume errors out if any Nvidia binary is missing.
 
 
 Release Notes - Mesos - Version 1.0.0



[1/2] mesos git commit: Updated 'NvidiaVolume' to not error out when binary is missing.

2016-08-03 Thread bmahler
Repository: mesos
Updated Branches:
  refs/heads/1.0.x d3e6a857e -> c2e6cc649


Updated 'NvidiaVolume' to not error out when binary is missing.

Previously, when building the volume, we would error out if a binary
we were trying to add was not found on the host filesystem. However,
these are not the semantics that we want. By design, we list all the
binaries the *may* exist on the filesystem that we want to put in the
volume, not all of the binaries that *must* exist. To this end, we
should simply skip any unfound binaries and move on to the next one
instead of erroring out.

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


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

Branch: refs/heads/1.0.x
Commit: e9a97c393aaccdd479e804105b533290a08f0a65
Parents: d3e6a85
Author: Kevin Klues 
Authored: Wed Aug 3 15:05:15 2016 -0700
Committer: Benjamin Mahler 
Committed: Wed Aug 3 15:48:27 2016 -0700

--
 .../mesos/isolators/gpu/volume.cpp  | 29 ++--
 1 file changed, 14 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/e9a97c39/src/slave/containerizer/mesos/isolators/gpu/volume.cpp
--
diff --git a/src/slave/containerizer/mesos/isolators/gpu/volume.cpp 
b/src/slave/containerizer/mesos/isolators/gpu/volume.cpp
index 478e106..478752f 100644
--- a/src/slave/containerizer/mesos/isolators/gpu/volume.cpp
+++ b/src/slave/containerizer/mesos/isolators/gpu/volume.cpp
@@ -283,24 +283,23 @@ Try NvidiaVolume::create()
 if (!os::exists(path)) {
   string command = "which " + binary;
   Try which = os::shell(command);
-  if (which.isError()) {
-return Error("Failed to os::shell '" + command + "': " + 
which.error());
-  }
 
-  which = strings::trim(which.get());
+  if (which.isSome()) {
+which = strings::trim(which.get());
 
-  Result realpath = os::realpath(which.get());
-  if (!realpath.isSome()) {
-return Error("Failed to os::realpath '" + which.get() + "':"
- " " + (realpath.isError()
-? realpath.error()
-: "No such file or directory"));
-  }
+Result realpath = os::realpath(which.get());
+if (!realpath.isSome()) {
+  return Error("Failed to os::realpath '" + which.get() + "':"
+   " " + (realpath.isError()
+  ? realpath.error()
+  : "No such file or directory"));
+}
 
-  command = "cp " + realpath.get() + " " + path;
-  Try cp = os::shell(command);
-  if (cp.isError()) {
-return Error("Failed to os::shell '" + command + "': " + cp.error());
+command = "cp " + realpath.get() + " " + path;
+Try cp = os::shell(command);
+if (cp.isError()) {
+  return Error("Failed to os::shell '" + command + "': " + cp.error());
+}
   }
 }
   }



mesos git commit: Updated 'NvidiaVolume' to not error out when binary is missing.

2016-08-03 Thread bmahler
Repository: mesos
Updated Branches:
  refs/heads/master 6f2a452d4 -> e31985119


Updated 'NvidiaVolume' to not error out when binary is missing.

Previously, when building the volume, we would error out if a binary
we were trying to add was not found on the host filesystem. However,
these are not the semantics that we want. By design, we list all the
binaries the *may* exist on the filesystem that we want to put in the
volume, not all of the binaries that *must* exist. To this end, we
should simply skip any unfound binaries and move on to the next one
instead of erroring out.

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


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

Branch: refs/heads/master
Commit: e31985119bdf69d496c0a2ed77ee0d7ddec2602b
Parents: 6f2a452
Author: Kevin Klues 
Authored: Wed Aug 3 15:05:15 2016 -0700
Committer: Benjamin Mahler 
Committed: Wed Aug 3 15:05:15 2016 -0700

--
 .../mesos/isolators/gpu/volume.cpp  | 29 ++--
 1 file changed, 14 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/e3198511/src/slave/containerizer/mesos/isolators/gpu/volume.cpp
--
diff --git a/src/slave/containerizer/mesos/isolators/gpu/volume.cpp 
b/src/slave/containerizer/mesos/isolators/gpu/volume.cpp
index 478e106..478752f 100644
--- a/src/slave/containerizer/mesos/isolators/gpu/volume.cpp
+++ b/src/slave/containerizer/mesos/isolators/gpu/volume.cpp
@@ -283,24 +283,23 @@ Try NvidiaVolume::create()
 if (!os::exists(path)) {
   string command = "which " + binary;
   Try which = os::shell(command);
-  if (which.isError()) {
-return Error("Failed to os::shell '" + command + "': " + 
which.error());
-  }
 
-  which = strings::trim(which.get());
+  if (which.isSome()) {
+which = strings::trim(which.get());
 
-  Result realpath = os::realpath(which.get());
-  if (!realpath.isSome()) {
-return Error("Failed to os::realpath '" + which.get() + "':"
- " " + (realpath.isError()
-? realpath.error()
-: "No such file or directory"));
-  }
+Result realpath = os::realpath(which.get());
+if (!realpath.isSome()) {
+  return Error("Failed to os::realpath '" + which.get() + "':"
+   " " + (realpath.isError()
+  ? realpath.error()
+  : "No such file or directory"));
+}
 
-  command = "cp " + realpath.get() + " " + path;
-  Try cp = os::shell(command);
-  if (cp.isError()) {
-return Error("Failed to os::shell '" + command + "': " + cp.error());
+command = "cp " + realpath.get() + " " + path;
+Try cp = os::shell(command);
+if (cp.isError()) {
+  return Error("Failed to os::shell '" + command + "': " + cp.error());
+}
   }
 }
   }



[5/7] mesos git commit: Renamed actor IDs for consistency.

2016-08-03 Thread alexr
Renamed actor IDs for consistency.

Make all actor IDs contain only lower case letters and dashes
(not underscores).

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


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

Branch: refs/heads/master
Commit: 6d671a91e1ebb118dfc08e708e096d2987f99434
Parents: a755c24
Author: Gastón Kleiman 
Authored: Wed Aug 3 14:29:02 2016 +0200
Committer: Alexander Rukletsov 
Committed: Wed Aug 3 14:29:02 2016 +0200

--
 src/authentication/cram_md5/authenticatee.cpp | 2 +-
 src/authentication/cram_md5/authenticator.cpp | 4 ++--
 src/executor/v0_v1executor.cpp| 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/6d671a91/src/authentication/cram_md5/authenticatee.cpp
--
diff --git a/src/authentication/cram_md5/authenticatee.cpp 
b/src/authentication/cram_md5/authenticatee.cpp
index 236de25..16291a1 100644
--- a/src/authentication/cram_md5/authenticatee.cpp
+++ b/src/authentication/cram_md5/authenticatee.cpp
@@ -56,7 +56,7 @@ public:
   CRAMMD5AuthenticateeProcess(
   const Credential& _credential,
   const UPID& _client)
-: ProcessBase(ID::generate("crammd5_authenticatee")),
+: ProcessBase(ID::generate("crammd5-authenticatee")),
   credential(_credential),
   client(_client),
   status(READY),

http://git-wip-us.apache.org/repos/asf/mesos/blob/6d671a91/src/authentication/cram_md5/authenticator.cpp
--
diff --git a/src/authentication/cram_md5/authenticator.cpp 
b/src/authentication/cram_md5/authenticator.cpp
index 4ec1568..9f89578 100644
--- a/src/authentication/cram_md5/authenticator.cpp
+++ b/src/authentication/cram_md5/authenticator.cpp
@@ -59,7 +59,7 @@ class CRAMMD5AuthenticatorSessionProcess :
 {
 public:
   explicit CRAMMD5AuthenticatorSessionProcess(const UPID& _pid)
-: ProcessBase(ID::generate("crammd5_authenticator_session")),
+: ProcessBase(ID::generate("crammd5-authenticator-session")),
   status(READY),
   pid(_pid),
   connection(nullptr) {}
@@ -405,7 +405,7 @@ class CRAMMD5AuthenticatorProcess :
 {
 public:
   CRAMMD5AuthenticatorProcess() :
-ProcessBase(ID::generate("crammd5_authenticator")) {}
+ProcessBase(ID::generate("crammd5-authenticator")) {}
 
   virtual ~CRAMMD5AuthenticatorProcess() {}
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/6d671a91/src/executor/v0_v1executor.cpp
--
diff --git a/src/executor/v0_v1executor.cpp b/src/executor/v0_v1executor.cpp
index cd1c590..61d5919 100644
--- a/src/executor/v0_v1executor.cpp
+++ b/src/executor/v0_v1executor.cpp
@@ -50,7 +50,7 @@ public:
   const function& connected,
   const function& disconnected,
   const function& received)
-: ProcessBase(process::ID::generate("v0ToV1Adapter")),
+: ProcessBase(process::ID::generate("v0-to-v1-adapter")),
   callbacks {connected, disconnected, received},
   subscribeCall(false) {}
 



[3/7] mesos git commit: Added missing process IDs.

2016-08-03 Thread alexr
Added missing process IDs.

After this change, all actors receive a distinguishable ID,
making it possible to match the logging output or the output
of the "__process__" enpoint to the source actor.

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


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

Branch: refs/heads/master
Commit: 145a73c4efff5ee38fbd2a52f971049b4892699e
Parents: 2006285
Author: Gastón Kleiman 
Authored: Wed Aug 3 13:46:40 2016 +0200
Committer: Alexander Rukletsov 
Committed: Wed Aug 3 14:04:36 2016 +0200

--
 src/examples/test_hook_module.cpp |  3 +++
 src/exec/exec.cpp |  3 ++-
 src/linux/cgroups.cpp | 18 +-
 src/linux/perf.cpp|  5 -
 src/linux/routing/link/link.cpp   |  5 -
 src/slave/container_loggers/logrotate.cpp |  4 +++-
 src/slave/container_loggers/sandbox.cpp   |  4 
 src/slave/containerizer/composing.cpp |  4 +++-
 src/slave/containerizer/mesos/containerizer.hpp   |  6 +-
 .../mesos/isolators/appc/runtime.cpp  |  5 -
 .../mesos/isolators/cgroups/cgroups.cpp   |  4 +++-
 .../mesos/isolators/cgroups/cpushare.cpp  |  4 +++-
 .../mesos/isolators/cgroups/devices.cpp   |  3 ++-
 .../containerizer/mesos/isolators/cgroups/mem.cpp |  4 +++-
 .../mesos/isolators/cgroups/net_cls.cpp   |  3 ++-
 .../mesos/isolators/cgroups/perf_event.hpp|  4 +++-
 .../mesos/isolators/docker/runtime.cpp|  5 -
 .../mesos/isolators/docker/volume/isolator.cpp|  4 +++-
 .../mesos/isolators/filesystem/linux.cpp  |  4 +++-
 .../mesos/isolators/filesystem/posix.cpp  |  5 -
 .../mesos/isolators/filesystem/shared.cpp |  5 -
 .../mesos/isolators/filesystem/windows.cpp|  5 -
 .../mesos/isolators/gpu/isolator.cpp  |  4 +++-
 .../mesos/isolators/namespaces/pid.hpp|  5 -
 .../mesos/isolators/network/cni/cni.hpp   |  4 +++-
 .../mesos/isolators/network/port_mapping.hpp  |  4 +++-
 src/slave/containerizer/mesos/isolators/posix.hpp |  7 +--
 .../containerizer/mesos/isolators/posix/disk.cpp  |  9 +++--
 .../containerizer/mesos/isolators/windows.hpp |  7 +--
 .../containerizer/mesos/isolators/xfs/disk.cpp|  5 -
 .../mesos/provisioner/appc/store.cpp  |  4 +++-
 .../mesos/provisioner/backends/aufs.cpp   |  4 
 .../mesos/provisioner/backends/bind.cpp   |  4 
 .../mesos/provisioner/backends/copy.cpp   |  4 
 .../mesos/provisioner/backends/overlay.cpp|  4 
 .../mesos/provisioner/docker/local_puller.cpp |  4 +++-
 .../mesos/provisioner/docker/registry_puller.cpp  |  3 ++-
 .../mesos/provisioner/docker/store.cpp|  4 +++-
 .../mesos/provisioner/provisioner.cpp |  3 ++-
 src/slave/gc.hpp  |  4 
 src/slave/qos_controllers/load.cpp|  4 +++-
 src/slave/qos_controllers/noop.cpp|  4 +++-
 src/slave/resource_estimators/fixed.cpp   |  4 +++-
 src/slave/resource_estimators/noop.cpp|  4 
 src/state/in_memory.cpp   |  4 
 src/state/leveldb.cpp |  5 -
 src/state/log.cpp |  4 +++-
 src/state/zookeeper.cpp   |  4 +++-
 src/uri/fetchers/docker.cpp   |  4 +++-
 49 files changed, 180 insertions(+), 47 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/examples/test_hook_module.cpp
--
diff --git a/src/examples/test_hook_module.cpp 
b/src/examples/test_hook_module.cpp
index f4063d3..5e91a71 100644
--- a/src/examples/test_hook_module.cpp
+++ b/src/examples/test_hook_module.cpp
@@ -21,6 +21,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
@@ -48,6 +49,8 @@ const char* testErrorLabelKey = "MESOS_Test_Error_Label";
 class HookProcess : public ProtobufProcess
 {
 public:
+  HookProcess() : ProcessBase(process::ID::generate("example-hook")) {}
+
   void initialize()
   {
 install(

http://git-wip-us.apache.org/repos/asf/mesos/blob/145a73c4/src/exec/exec.cpp
--
diff --git a/src/exec/exec.cpp b/src/exec/exec.cpp
index 90a16a9..c1cda5a 100644
--- a/src/exec/exec.cpp
+++ b/src/exec/exec.cpp
@@ -84,7 +84,8 @@ class ShutdownProcess : 

[2/7] mesos git commit: Libprocess: Added missing process IDs.

2016-08-03 Thread alexr
Libprocess: Added missing process IDs.

After this change, all libprocess actors receive a distinguishable
ID, making it possible to match the logging output or the output of
the "__process__" enpoint to the source actor.

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


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

Branch: refs/heads/master
Commit: 20062853df5cddf37ce2c462621fda5b765cdc3c
Parents: 987fdef
Author: Gastón Kleiman 
Authored: Wed Aug 3 13:22:01 2016 +0200
Committer: Alexander Rukletsov 
Committed: Wed Aug 3 13:45:06 2016 +0200

--
 3rdparty/libprocess/include/process/collect.hpp  | 7 +--
 3rdparty/libprocess/include/process/protobuf.hpp | 5 -
 3rdparty/libprocess/include/process/run.hpp  | 4 +++-
 3rdparty/libprocess/src/authenticator.cpp| 5 -
 4 files changed, 16 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/20062853/3rdparty/libprocess/include/process/collect.hpp
--
diff --git a/3rdparty/libprocess/include/process/collect.hpp 
b/3rdparty/libprocess/include/process/collect.hpp
index 5a92b72..fccf55a 100644
--- a/3rdparty/libprocess/include/process/collect.hpp
+++ b/3rdparty/libprocess/include/process/collect.hpp
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -65,7 +66,8 @@ public:
   CollectProcess(
   const std::list& _futures,
   Promise* _promise)
-: futures(_futures),
+: ProcessBase(ID::generate("__collect__")),
+  futures(_futures),
   promise(_promise),
   ready(0) {}
 
@@ -131,7 +133,8 @@ public:
   AwaitProcess(
   const std::list& _futures,
   Promise>* _promise)
-: futures(_futures),
+: ProcessBase(ID::generate("__await__")),
+  futures(_futures),
   promise(_promise),
   ready(0) {}
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/20062853/3rdparty/libprocess/include/process/protobuf.hpp
--
diff --git a/3rdparty/libprocess/include/process/protobuf.hpp 
b/3rdparty/libprocess/include/process/protobuf.hpp
index 78ff40e..695c6e6 100644
--- a/3rdparty/libprocess/include/process/protobuf.hpp
+++ b/3rdparty/libprocess/include/process/protobuf.hpp
@@ -23,6 +23,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -950,7 +951,9 @@ class ReqResProcess : public 
ProtobufProcess >
 {
 public:
   ReqResProcess(const process::UPID& _pid, const Req& _req)
-: pid(_pid), req(_req)
+: process::ProcessBase(process::ID::generate("__req_res__")),
+  pid(_pid),
+  req(_req)
   {
 ProtobufProcess >::template
   install(::response);

http://git-wip-us.apache.org/repos/asf/mesos/blob/20062853/3rdparty/libprocess/include/process/run.hpp
--
diff --git a/3rdparty/libprocess/include/process/run.hpp 
b/3rdparty/libprocess/include/process/run.hpp
index d141fb0..2c8b836 100644
--- a/3rdparty/libprocess/include/process/run.hpp
+++ b/3rdparty/libprocess/include/process/run.hpp
@@ -15,6 +15,7 @@
 
 #include  // TODO(benh): Replace shared_ptr with unique_ptr.
 
+#include 
 #include 
 
 #include 
@@ -30,7 +31,8 @@ class ThunkProcess : public Process
 public:
   ThunkProcess(std::shared_ptr> _thunk,
std::shared_ptr _promise)
-: thunk(_thunk),
+: ProcessBase(ID::generate("__thunk__")),
+  thunk(_thunk),
   promise(_promise) {}
 
   virtual ~ThunkProcess() {}

http://git-wip-us.apache.org/repos/asf/mesos/blob/20062853/3rdparty/libprocess/src/authenticator.cpp
--
diff --git a/3rdparty/libprocess/src/authenticator.cpp 
b/3rdparty/libprocess/src/authenticator.cpp
index 55e8558..cfedb6f 100644
--- a/3rdparty/libprocess/src/authenticator.cpp
+++ b/3rdparty/libprocess/src/authenticator.cpp
@@ -11,6 +11,7 @@
 // limitations under the License
 
 #include 
+#include 
 
 #include 
 #include 
@@ -53,7 +54,9 @@ private:
 BasicAuthenticatorProcess::BasicAuthenticatorProcess(
 const string& realm,
 const hashmap& credentials)
-  : realm_(realm), credentials_(credentials) {}
+  : ProcessBase(ID::generate("__basic_authenticator__")),
+realm_(realm),
+credentials_(credentials) {}
 
 
 Future BasicAuthenticatorProcess::authenticate(



[7/7] mesos git commit: Ensured HierarchicalAllocatorProcess specifies a process ID.

2016-08-03 Thread alexr
Ensured HierarchicalAllocatorProcess specifies a process ID.

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


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

Branch: refs/heads/master
Commit: 6f2a452d4876b2073ad552df88aa6e49f3e36a34
Parents: 45e79a4
Author: Gastón Kleiman 
Authored: Wed Aug 3 14:32:22 2016 +0200
Committer: Alexander Rukletsov 
Committed: Wed Aug 3 14:32:22 2016 +0200

--
 src/master/allocator/mesos/hierarchical.hpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/6f2a452d/src/master/allocator/mesos/hierarchical.hpp
--
diff --git a/src/master/allocator/mesos/hierarchical.hpp 
b/src/master/allocator/mesos/hierarchical.hpp
index b72ba16..bdbc6d3 100644
--- a/src/master/allocator/mesos/hierarchical.hpp
+++ b/src/master/allocator/mesos/hierarchical.hpp
@@ -75,8 +75,7 @@ public:
   const std::function& _roleSorterFactory,
   const std::function& _frameworkSorterFactory,
   const std::function& _quotaRoleSorterFactory)
-: ProcessBase(process::ID::generate("hierarchical-allocator")),
-  initialized(false),
+: initialized(false),
   paused(true),
   metrics(*this),
   roleSorter(nullptr),
@@ -485,7 +484,8 @@ class HierarchicalAllocatorProcess
 {
 public:
   HierarchicalAllocatorProcess()
-: internal::HierarchicalAllocatorProcess(
+: ProcessBase(process::ID::generate("hierarchical-allocator")),
+  internal::HierarchicalAllocatorProcess(
   [this]() -> Sorter* {
 return new RoleSorter(this->self(), "allocator/mesos/roles/");
   },



[6/7] mesos git commit: Added "zookeeper" prefix to ZK process IDs.

2016-08-03 Thread alexr
Added "zookeeper" prefix to ZK process IDs.

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


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

Branch: refs/heads/master
Commit: 45e79a4403167e0b91297e226ae64050648d7474
Parents: 6d671a9
Author: Gastón Kleiman 
Authored: Wed Aug 3 14:30:43 2016 +0200
Committer: Alexander Rukletsov 
Committed: Wed Aug 3 14:30:43 2016 +0200

--
 src/zookeeper/contender.cpp | 2 +-
 src/zookeeper/detector.cpp  | 2 +-
 src/zookeeper/group.cpp | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/45e79a44/src/zookeeper/contender.cpp
--
diff --git a/src/zookeeper/contender.cpp b/src/zookeeper/contender.cpp
index 3206581..fa49647 100644
--- a/src/zookeeper/contender.cpp
+++ b/src/zookeeper/contender.cpp
@@ -100,7 +100,7 @@ LeaderContenderProcess::LeaderContenderProcess(
 Group* _group,
 const string& _data,
 const Option& _label)
-  : ProcessBase(process::ID::generate("leader-contender")),
+  : ProcessBase(process::ID::generate("zookeeper-leader-contender")),
 group(_group),
 data(_data),
 label(_label) {}

http://git-wip-us.apache.org/repos/asf/mesos/blob/45e79a44/src/zookeeper/detector.cpp
--
diff --git a/src/zookeeper/detector.cpp b/src/zookeeper/detector.cpp
index f1def68..c9fa49c 100644
--- a/src/zookeeper/detector.cpp
+++ b/src/zookeeper/detector.cpp
@@ -63,7 +63,7 @@ private:
 
 
 LeaderDetectorProcess::LeaderDetectorProcess(Group* _group)
-  : ProcessBase(ID::generate("leader-detector")),
+  : ProcessBase(ID::generate("zookeeper-leader-detector")),
 group(_group),
 leader(None()) {}
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/45e79a44/src/zookeeper/group.cpp
--
diff --git a/src/zookeeper/group.cpp b/src/zookeeper/group.cpp
index 7438ecc..2c1589b 100644
--- a/src/zookeeper/group.cpp
+++ b/src/zookeeper/group.cpp
@@ -90,7 +90,7 @@ GroupProcess::GroupProcess(
 const Duration& _sessionTimeout,
 const string& _znode,
 const Option& _auth)
-  : ProcessBase(ID::generate("group")),
+  : ProcessBase(ID::generate("zookeeper-group")),
 servers(_servers),
 sessionTimeout(_sessionTimeout),
 znode(strings::remove(_znode, "/", strings::SUFFIX)),
@@ -110,7 +110,7 @@ GroupProcess::GroupProcess(
 GroupProcess::GroupProcess(
 const URL& url,
 const Duration& _sessionTimeout)
-  : ProcessBase(ID::generate("group")),
+  : ProcessBase(ID::generate("zookeeper-group")),
 servers(url.servers),
 sessionTimeout(_sessionTimeout),
 znode(strings::remove(url.path, "/", strings::SUFFIX)),



[1/7] mesos git commit: Libprocess: Added id to the Sequence c-tor.

2016-08-03 Thread alexr
Repository: mesos
Updated Branches:
  refs/heads/master 4f297654f -> 6f2a452d4


Libprocess: Added id to the Sequence c-tor.

Sequence IDs used to be tagged as "(1)", "(2)", etc. This made it
very hard to match the output from logging or the "__processes__"
endpoint to actors.

This change makes it possible to give sequence processes a
distinguishable ID and updates c-tor invocation sites.

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


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

Branch: refs/heads/master
Commit: 987fdef0b2a71a49f17c9f250abb4b510dfba919
Parents: 4f29765
Author: Gastón Kleiman 
Authored: Wed Aug 3 13:18:19 2016 +0200
Committer: Alexander Rukletsov 
Committed: Wed Aug 3 13:45:05 2016 +0200

--
 3rdparty/libprocess/include/process/sequence.hpp | 11 +++
 3rdparty/libprocess/src/process.cpp  |  4 ++--
 2 files changed, 9 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/987fdef0/3rdparty/libprocess/include/process/sequence.hpp
--
diff --git a/3rdparty/libprocess/include/process/sequence.hpp 
b/3rdparty/libprocess/include/process/sequence.hpp
index 78ccdb9..c9a46f2 100644
--- a/3rdparty/libprocess/include/process/sequence.hpp
+++ b/3rdparty/libprocess/include/process/sequence.hpp
@@ -16,6 +16,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
@@ -32,7 +33,7 @@ class SequenceProcess;
 class Sequence
 {
 public:
-  Sequence();
+  Sequence(const std::string& id = "sequence");
   ~Sequence();
 
   // Registers a callback that will be invoked when all the futures
@@ -62,7 +63,9 @@ private:
 class SequenceProcess : public Process
 {
 public:
-  SequenceProcess() : last(Nothing()) {}
+  SequenceProcess(const std::string& id)
+: ProcessBase(ID::generate(id)),
+  last(Nothing()) {}
 
   template 
   Future add(const lambda::function& callback)
@@ -163,9 +166,9 @@ private:
 };
 
 
-inline Sequence::Sequence()
+inline Sequence::Sequence(const std::string& id)
 {
-  process = new SequenceProcess();
+  process = new SequenceProcess(id);
   process::spawn(process);
 }
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/987fdef0/3rdparty/libprocess/src/process.cpp
--
diff --git a/3rdparty/libprocess/src/process.cpp 
b/3rdparty/libprocess/src/process.cpp
index 7f331b8..629f164 100644
--- a/3rdparty/libprocess/src/process.cpp
+++ b/3rdparty/libprocess/src/process.cpp
@@ -1176,7 +1176,7 @@ void HttpProxy::initialize()
   // constructor in order to prevent a deadlock between the
   // SocketManager and the ProcessManager (see the comment in
   // SocketManager::proxy).
-  authentications.reset(new Sequence());
+  authentications.reset(new Sequence("__authentications__"));
 }
 
 
@@ -3344,7 +3344,7 @@ void ProcessBase::visit(const HttpEvent& event)
   // Lazily initialize the Sequence needed for ordering requests
   // across authentication and authorization.
   if (handlers.httpSequence.get() == nullptr) {
-handlers.httpSequence.reset(new Sequence());
+handlers.httpSequence.reset(new Sequence("__auth_handlers__"));
   }
 
   CHECK(event.request->url.path.find('/') == 0); // See ProcessManager::handle.



[4/7] mesos git commit: Libprocess: Renamed actor IDs for consistency.

2016-08-03 Thread alexr
Libprocess: Renamed actor IDs for consistency.

Enforce the following actor ID schema in libprocess:

- Actor IDs contain only lowercase characters, dashes or underscores.
- The ID of an actor that is exposed to libprocess users, via a route/
  associated to an endpoint uses dashes as word separator, e.g., `help`.
- The ID of an actor internal to libprocess, with not associated
  route/endpoint, must be enclosed in double quotes and use underscores
  instead of dashes as word separator, e.g.,
  `__authentication_router__`.

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


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

Branch: refs/heads/master
Commit: a755c24f80752c9a27b761852a5a561072d53fae
Parents: 145a73c
Author: Gastón Kleiman 
Authored: Wed Aug 3 14:25:34 2016 +0200
Committer: Alexander Rukletsov 
Committed: Wed Aug 3 14:28:07 2016 +0200

--
 3rdparty/libprocess/src/authenticator_manager.cpp | 2 +-
 3rdparty/libprocess/src/reap.cpp  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/a755c24f/3rdparty/libprocess/src/authenticator_manager.cpp
--
diff --git a/3rdparty/libprocess/src/authenticator_manager.cpp 
b/3rdparty/libprocess/src/authenticator_manager.cpp
index 7def832..a22acd0 100644
--- a/3rdparty/libprocess/src/authenticator_manager.cpp
+++ b/3rdparty/libprocess/src/authenticator_manager.cpp
@@ -55,7 +55,7 @@ private:
 
 
 AuthenticatorManagerProcess::AuthenticatorManagerProcess()
-  : ProcessBase(ID::generate("AuthenticationRouter")) {}
+  : ProcessBase(ID::generate("__authentication_router__")) {}
 
 
 Future AuthenticatorManagerProcess::setAuthenticator(

http://git-wip-us.apache.org/repos/asf/mesos/blob/a755c24f/3rdparty/libprocess/src/reap.cpp
--
diff --git a/3rdparty/libprocess/src/reap.cpp b/3rdparty/libprocess/src/reap.cpp
index ac60c6d..f8d2fdc 100644
--- a/3rdparty/libprocess/src/reap.cpp
+++ b/3rdparty/libprocess/src/reap.cpp
@@ -64,7 +64,7 @@ Duration MAX_REAP_INTERVAL() { return Seconds(1); }
 class ReaperProcess : public Process
 {
 public:
-  ReaperProcess() : ProcessBase(ID::generate("reaper")) {}
+  ReaperProcess() : ProcessBase(ID::generate("__reaper__")) {}
 
   Future