mesos-site git commit: Updated the website built from mesos SHA: 1e71208.

2018-02-14 Thread git-site-role
Repository: mesos-site
Updated Branches:
  refs/heads/asf-site 219b60ccd -> a3c56eb05


Updated the website built from mesos SHA: 1e71208.


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

Branch: refs/heads/asf-site
Commit: a3c56eb05ade7427af87220c120a2739f1c0a7f0
Parents: 219b60c
Author: jenkins 
Authored: Wed Feb 14 22:28:29 2018 +
Committer: jenkins 
Committed: Wed Feb 14 22:28:29 2018 +

--
 content/api/latest/c++/src_2uri_2fetcher_8hpp_source.html| 8 
 content/blog/feed.xml| 2 +-
 .../performance-working-group-progress-report/index.html | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/a3c56eb0/content/api/latest/c++/src_2uri_2fetcher_8hpp_source.html
--
diff --git a/content/api/latest/c++/src_2uri_2fetcher_8hpp_source.html 
b/content/api/latest/c++/src_2uri_2fetcher_8hpp_source.html
index 38783a9..803b643 100644
--- a/content/api/latest/c++/src_2uri_2fetcher_8hpp_source.html
+++ b/content/api/latest/c++/src_2uri_2fetcher_8hpp_source.html
@@ -90,11 +90,11 @@

36
40class Flags :
41 
 public virtual CopyFetcherPlugin::Flags,
-   
42#ifdef __WINDOWS__
-   
43  // 
TODO(dpravat): Add support for Hadoop and Docker plugins. See 
MESOS-5473.
-   44 
 public virtual CurlFetcherPlugin::Flags
 {};
+   42 
 public virtual CurlFetcherPlugin::Flags,
+   
43#ifdef __WINDOWS__
+   
44  public virtual HadoopFetcherPlugin::Flags
 {};

45#else
-   
46  public virtual CurlFetcherPlugin::Flags,
+   
46  // 
TODO(coffler): Add support for Docker plugins. See MESOS-8570.
47 
 public virtual HadoopFetcherPlugin::Flags,
48 
 public virtual DockerFetcherPlugin::Flags
 {};

49#endif // __WINDOWS__

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/a3c56eb0/content/blog/feed.xml
--
diff --git a/content/blog/feed.xml b/content/blog/feed.xml
index 964d6ec..9b107ca 100644
--- a/content/blog/feed.xml
+++ b/content/blog/feed.xml
@@ -295,7 +295,7 @@ To learn more about CSI work in Mesos, you can dig into the 
design document 
 /ul
 
 
-pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#x6d;#97;#x69;#x6c;#116;#x6f;#x3a;#x64;#x65;#118;#x40;#97;#112;#97;#x63;#104;#101;#x2e;#109;#x65;#115;#x6f;#x73;#46;#x6f;#114;#103;#x64;#x65;#x76;#64;#97;#112;#97;#99;#104;#x65;#x2e;#x6d;#101;#x73;#111;#115;#x2e;#111;#114;#x67;/a./p
+pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#x6d;#97;#105;#x6c;#x74;#x6f;#x3a;#100;#x65;#x76;#64;#x61;#112;#x61;#x63;#x68;#x65;#46;#109;#101;#115;#x6f;#x73;#46;#x6f;#114;#x67;#100;#x65;#x76;#x40;#97;#x70;#x61;#x63;#x68;#101;#x2e;#x6d;#x65;#115;#111;#115;#x2e;#x6f;#x72;#103;/a./p
 

   

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/a3c56eb0/content/blog/performance-working-group-progress-report/index.html
--
diff --git a/content/blog/performance-working-group-progress-report/index.html 
b/content/blog/performance-working-group-progress-report/index.html
index 2b50482..05992c8 100644
--- a/content/blog/performance-working-group-progress-report/index.html
+++ b/content/blog/performance-working-group-progress-report/index.html
@@ -248,7 +248,7 @@
 
 
 
-If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
+If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
 
   
 



mesos git commit: Windows: Enabled `CurlFetcherPlugin` and `HadoopFetcherPlugin`.

2018-02-14 Thread andschwa
Repository: mesos
Updated Branches:
  refs/heads/master e36e3b998 -> 1e7120833


Windows: Enabled `CurlFetcherPlugin` and `HadoopFetcherPlugin`.

Replaced checking for `/` with `path::absolute`, and fixed `argv[0]`
assumption when invoking `hadoop`.

Ported the HDFS mock script from Shell to Batch to emulate the `hadoop`
command.

Enabled the plugins and associated tests.

Review: https://reviews.apache.org/r/65617/
Review: https://reviews.apache.org/r/65618/
Review: https://reviews.apache.org/r/65619/
Review: https://reviews.apache.org/r/65620/


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

Branch: refs/heads/master
Commit: 1e71208338fc525d42cd8dd0ffad5a0841e40a92
Parents: e36e3b9
Author: Jeff Coffler 
Authored: Wed Feb 14 12:33:20 2018 -0800
Committer: Andrew Schwartzmeyer 
Committed: Wed Feb 14 14:01:51 2018 -0800

--
 src/CMakeLists.txt  |  6 +++---
 src/hdfs/hdfs.cpp   |  4 ++--
 src/tests/uri_fetcher_tests.cpp | 35 ---
 src/uri/fetcher.cpp |  4 ++--
 src/uri/fetcher.hpp |  6 +++---
 5 files changed, 30 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/1e712083/src/CMakeLists.txt
--
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 21fb47e..0c13503 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -373,12 +373,12 @@ set(URI_SRC
   uri/fetcher.cpp
   uri/utils.cpp
   uri/fetchers/copy.cpp
-  uri/fetchers/curl.cpp)
+  uri/fetchers/curl.cpp
+  uri/fetchers/hadoop.cpp)
 
 if (NOT WIN32)
   list(APPEND URI_SRC
-uri/fetchers/docker.cpp
-uri/fetchers/hadoop.cpp)
+uri/fetchers/docker.cpp)
 endif ()
 
 set(USAGE_SRC

http://git-wip-us.apache.org/repos/asf/mesos/blob/1e712083/src/hdfs/hdfs.cpp
--
diff --git a/src/hdfs/hdfs.cpp b/src/hdfs/hdfs.cpp
index f9fc1cbb5..726925f 100644
--- a/src/hdfs/hdfs.cpp
+++ b/src/hdfs/hdfs.cpp
@@ -143,7 +143,7 @@ Try HDFS::create(const Option& _hadoop)
 static string normalize(const string& hdfsPath)
 {
   if (strings::contains(hdfsPath, "://") || // A URI or a malformed path.
-  strings::startsWith(hdfsPath, "/")) { // Already an absolute path.
+  path::absolute(hdfsPath)) { // Already an absolute path.
 return hdfsPath;
   }
 
@@ -316,7 +316,7 @@ Future HDFS::copyToLocal(const string& from, const 
string& to)
 {
   Try s = subprocess(
   hadoop,
-  {"hadoop", "fs", "-copyToLocal", normalize(from), to},
+  {hadoop, "fs", "-copyToLocal", normalize(from), to},
   Subprocess::PATH(os::DEV_NULL),
   Subprocess::PIPE(),
   Subprocess::PIPE());

http://git-wip-us.apache.org/repos/asf/mesos/blob/1e712083/src/tests/uri_fetcher_tests.cpp
--
diff --git a/src/tests/uri_fetcher_tests.cpp b/src/tests/uri_fetcher_tests.cpp
index 0acb854..816d8ec 100644
--- a/src/tests/uri_fetcher_tests.cpp
+++ b/src/tests/uri_fetcher_tests.cpp
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -158,12 +159,17 @@ public:
 
 // Create a fake hadoop command line tool. It emulates the hadoop
 // client's logic while operating on the local filesystem.
+#ifndef __WINDOWS__
 hadoop = path::join(os::getcwd(), "hadoop");
+#else
+hadoop = path::join(os::getcwd(), "hadoop.bat");
+#endif // __WINDOWS__
 
 // The script emulating 'hadoop fs -copyToLocal  '.
 // NOTE: We emulate a version call here which is exercised when
 // creating the HDFS client. But, we don't expect any other
 // command to be called.
+#ifndef __WINDOWS__
 ASSERT_SOME(os::write(
 hadoop,
 "#!/bin/sh\n"
@@ -178,12 +184,23 @@ public:
 "fi\n"
 "cp $3 $4\n"));
 
-// Make sure the script has execution permission. On Windows, we always
-// have permission.
-#ifndef __WINDOWS__
+// Make sure the script has execution permission.
 ASSERT_SOME(os::chmod(
 hadoop,
 S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH));
+#else
+// NOTE: This is a `.bat` file instead of PowerShell so that it can be
+// directly executed. Windows "knows" how to launch files ending in `.bat`,
+// similar to the shebang logic for POSIX. However, this does not extend to
+// PowerShell's `.ps1` scripts.
+ASSERT_SOME(os::write(
+hadoop,
+"if \"%1\" == \"version\" (exit 0)\n"
+"if NOT \"%1\" == \"fs\" (exit 1)\n"
+"if NOT \"%2\" == 

[4/7] mesos git commit: Stopped shutting down the whole default executor on task launch failure.

2018-02-14 Thread qianzhang
Stopped shutting down the whole default executor on task launch failure.

The default executor would be completely shutdown on a
`LAUNCH_NESTED_CONTAINER` failure.

This patch makes it kill the affected task group instead of shutting
down and killing all task groups.

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


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

Branch: refs/heads/1.5.x
Commit: e5afcbec307c10416f885fedc450f023273371e4
Parents: 24b8b43
Author: Gaston Kleiman 
Authored: Wed Feb 14 14:35:11 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 21:03:19 2018 +0800

--
 src/launcher/default_executor.cpp | 167 -
 1 file changed, 104 insertions(+), 63 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/e5afcbec/src/launcher/default_executor.cpp
--
diff --git a/src/launcher/default_executor.cpp 
b/src/launcher/default_executor.cpp
index ea9b2d4..16977b5 100644
--- a/src/launcher/default_executor.cpp
+++ b/src/launcher/default_executor.cpp
@@ -108,6 +108,9 @@ private:
 // `WAIT_NESTED_CONTAINER` call has not been established yet.
 Option waiting;
 
+// Error returned by the agent while trying to launch the container.
+Option launchError;
+
 // TODO(bennoe): Create a real state machine instead of adding
 // more and more ad-hoc boolean values.
 
@@ -420,6 +423,7 @@ protected:
 None(),
 None(),
 None(),
+None(),
 false,
 false,
 false,
@@ -522,28 +526,32 @@ protected:
   return;
 }
 
-// Check if we received a 200 OK response for all the
-// `LAUNCH_NESTED_CONTAINER` calls. Shutdown the executor
-// if this is not the case.
-foreach (const Response& response, responses.get()) {
-  if (response.code != process::http::Status::OK) {
-LOG(ERROR) << "Received '" << response.status << "' ("
-   << response.body << ") while launching child container";
-_shutdown();
-return;
-  }
-}
-
 CHECK(launched);
 CHECK_EQ(containerIds.size(), (size_t) taskGroup.tasks().size());
+CHECK_EQ(containerIds.size(), responses->size());
 
-size_t index = 0;
+int index = 0;
+auto responseIterator = responses->begin();
 foreach (const ContainerID& containerId, containerIds) {
   const TaskInfo& task = taskGroup.tasks().Get(index++);
   const TaskID& taskId = task.task_id();
+  const Response& response = *(responseIterator++);
 
   CHECK(containers.contains(taskId));
-  containers.at(taskId)->launched = true;
+  Container* container = containers.at(taskId).get();
+
+  // Check if we received a 200 OK response for the
+  // `LAUNCH_NESTED_CONTAINER` call. Skip the rest of the container
+  // initialization if this is not the case.
+  if (response.code != process::http::Status::OK) {
+LOG(ERROR) << "Received '" << response.status << "' (" << response.body
+   << ") while launching child container " << containerId
+   << " of task '" << taskId << "'";
+container->launchError = response.body;
+continue;
+  }
+
+  container->launched = true;
 
   if (task.has_check()) {
 Try checker =
@@ -563,7 +571,7 @@ protected:
   return;
 }
 
-containers.at(taskId)->checker = checker.get();
+container->checker = checker.get();
   }
 
   if (task.has_health_check()) {
@@ -585,7 +593,7 @@ protected:
   return;
 }
 
-containers.at(taskId)->healthChecker = healthChecker.get();
+container->healthChecker = healthChecker.get();
   }
 
   // Currently, the Mesos agent does not expose the mapping from
@@ -611,13 +619,8 @@ protected:
<< containerId << " of task '" << taskId << "' due to: "
<< symlink.error();
   }
-}
 
-// Send a TASK_RUNNING status update now that the task group has
-// been successfully launched.
-foreach (const TaskInfo& task, taskGroup.tasks()) {
-  const TaskStatus status = createTaskStatus(task.task_id(), TASK_RUNNING);
-  forward(status);
+  forward(createTaskStatus(task.task_id(), TASK_RUNNING));
 }
 
 auto taskIds = []() {
@@ -629,7 +632,7 @@ protected:
 };
 
 LOG(INFO)
-  << "Successfully launched tasks "
+  << "Finished launching tasks "
   << stringify(taskIds()) << " in child containers "
   << stringify(containerIds);
 
@@ -786,9 +789,12 @@ 

[6/7] mesos git commit: Removed outdated executor-wide launched flag from the default executor.

2018-02-14 Thread qianzhang
Removed outdated executor-wide launched flag from the default executor.

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


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

Branch: refs/heads/1.5.x
Commit: 4b4d7376059167f38e08e0e6bbcbbe3480973b5d
Parents: f9f8d6b
Author: Gaston Kleiman 
Authored: Wed Feb 14 14:35:34 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 21:06:40 2018 +0800

--
 src/launcher/default_executor.cpp | 13 -
 1 file changed, 4 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/4b4d7376/src/launcher/default_executor.cpp
--
diff --git a/src/launcher/default_executor.cpp 
b/src/launcher/default_executor.cpp
index ff437bc..8720dad 100644
--- a/src/launcher/default_executor.cpp
+++ b/src/launcher/default_executor.cpp
@@ -114,7 +114,7 @@ private:
 // TODO(bennoe): Create a real state machine instead of adding
 // more and more ad-hoc boolean values.
 
-// Indicates whether a container has been launched.
+// Indicates whether the child container has been launched.
 bool launched;
 
 // Indicates whether a status update acknowledgement
@@ -139,7 +139,6 @@ public:
 : ProcessBase(process::ID::generate("default-executor")),
   state(DISCONNECTED),
   contentType(ContentType::PROTOBUF),
-  launched(false),
   shuttingDown(false),
   unhealthy(false),
   frameworkInfo(None()),
@@ -207,7 +206,7 @@ public:
 // It is possible that the agent process had failed after we
 // had launched the child containers. We can resume waiting on the
 // child containers again.
-if (launched) {
+if (!containers.empty()) {
   wait(containers.keys());
 }
 
@@ -349,8 +348,6 @@ protected:
   {
 CHECK_EQ(SUBSCRIBED, state);
 
-launched = true;
-
 process::http::connect(agent)
   .onAny(defer(self(), ::_launchGroup, taskGroup, lambda::_1));
   }
@@ -540,7 +537,6 @@ protected:
   return;
 }
 
-CHECK(launched);
 CHECK_EQ(containerIds.size(), (size_t) taskGroup.tasks().size());
 CHECK_EQ(containerIds.size(), responses->size());
 
@@ -666,7 +662,7 @@ protected:
   void wait(const list& taskIds)
   {
 CHECK_EQ(SUBSCRIBED, state);
-CHECK(launched);
+CHECK(!containers.empty());
 CHECK_SOME(connectionId);
 
 LOG(INFO) << "Waiting on child containers of tasks " << stringify(taskIds);
@@ -1014,7 +1010,7 @@ protected:
 
 shuttingDown = true;
 
-if (!launched) {
+if (containers.empty()) {
   _shutdown();
   return;
 }
@@ -1550,7 +1546,6 @@ private:
   } state;
 
   const ContentType contentType;
-  bool launched;
   bool shuttingDown;
   bool unhealthy; // Set to true if any of the tasks are reported unhealthy.
   Option frameworkInfo;



[1/7] mesos git commit: Added `Event::Update` and `v1::scheduler::TaskStatus` ostream operators.

2018-02-14 Thread qianzhang
Repository: mesos
Updated Branches:
  refs/heads/1.5.x ee0fb5908 -> 9840ae195


Added `Event::Update` and `v1::scheduler::TaskStatus` ostream operators.

This operators make gtest print a human-readable representation of the
protos on test failures.

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


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

Branch: refs/heads/1.5.x
Commit: 5c6e757f1962ef74fb1356631787791ceaa4106e
Parents: ee0fb59
Author: Gaston Kleiman 
Authored: Wed Feb 14 14:34:50 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 20:58:09 2018 +0800

--
 include/mesos/v1/mesos.hpp   |  3 +++
 include/mesos/v1/scheduler/scheduler.hpp | 10 
 src/v1/mesos.cpp | 37 +++
 3 files changed, 50 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/5c6e757f/include/mesos/v1/mesos.hpp
--
diff --git a/include/mesos/v1/mesos.hpp b/include/mesos/v1/mesos.hpp
index d4c354a..f16568e 100644
--- a/include/mesos/v1/mesos.hpp
+++ b/include/mesos/v1/mesos.hpp
@@ -395,6 +395,9 @@ std::ostream& operator<<(
 const ResourceProviderInfo& resourceProviderInfo);
 
 
+std::ostream& operator<<(std::ostream& stream, const TaskStatus& status);
+
+
 std::ostream& operator<<(std::ostream& stream, const AgentID& agentId);
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/5c6e757f/include/mesos/v1/scheduler/scheduler.hpp
--
diff --git a/include/mesos/v1/scheduler/scheduler.hpp 
b/include/mesos/v1/scheduler/scheduler.hpp
index 2fdd8f2..ab94462 100644
--- a/include/mesos/v1/scheduler/scheduler.hpp
+++ b/include/mesos/v1/scheduler/scheduler.hpp
@@ -19,6 +19,8 @@
 
 #include 
 
+#include 
+
 // ONLY USEFUL AFTER RUNNING PROTOC.
 #include 
 
@@ -37,6 +39,14 @@ inline std::ostream& operator<<(std::ostream& stream, const 
Event::Type& type)
   return stream << Event::Type_Name(type);
 }
 
+
+inline std::ostream& operator<<(
+std::ostream& stream,
+const Event::Update& update)
+{
+  return stream << update.status();
+}
+
 } // namespace scheduler {
 } // namespace v1 {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/5c6e757f/src/v1/mesos.cpp
--
diff --git a/src/v1/mesos.cpp b/src/v1/mesos.cpp
index 8abeae0..576f367 100644
--- a/src/v1/mesos.cpp
+++ b/src/v1/mesos.cpp
@@ -17,6 +17,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -600,6 +601,42 @@ ostream& operator<<(ostream& stream, const RLimitInfo& 
limits)
 }
 
 
+ostream& operator<<(ostream& stream, const TaskStatus& status)
+{
+  stream << status.state();
+
+  if (status.has_uuid()) {
+stream << " (Status UUID: "
+   << stringify(id::UUID::fromBytes(status.uuid()).get()) << ")";
+  }
+
+  if (status.has_source()) {
+stream << " Source: " << TaskStatus::Source_Name(status.source());
+  }
+
+  if (status.has_reason()) {
+stream << " Reason: " << TaskStatus::Reason_Name(status.reason());
+  }
+
+  if (status.has_message()) {
+stream << " Message: '" << status.message() << "'";
+  }
+
+  stream << " for task '" << status.task_id() << "'";
+
+  if (status.has_agent_id()) {
+stream << " on agent: " << status.agent_id() << "";
+  }
+
+  if (status.has_healthy()) {
+stream << " in health state "
+   << (status.healthy() ? "healthy" : "unhealthy");
+  }
+
+  return stream;
+}
+
+
 ostream& operator<<(ostream& stream, const AgentID& agentId)
 {
   return stream << agentId.value();



[3/7] mesos git commit: Improved some default executor log messages.

2018-02-14 Thread qianzhang
Improved some default executor log messages.

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


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

Branch: refs/heads/1.5.x
Commit: 2459ea1b5707f27e0118b4fbb3810399beafbc79
Parents: 5c6e757
Author: Gaston Kleiman 
Authored: Wed Feb 14 14:34:56 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 20:58:10 2018 +0800

--
 src/launcher/default_executor.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/2459ea1b/src/launcher/default_executor.cpp
--
diff --git a/src/launcher/default_executor.cpp 
b/src/launcher/default_executor.cpp
index 6c88de4..9aab90d 100644
--- a/src/launcher/default_executor.cpp
+++ b/src/launcher/default_executor.cpp
@@ -357,7 +357,7 @@ protected:
   const Future& connection)
   {
 if (shuttingDown) {
-  LOG(WARNING) << "Ignoring the launch operation as the "
+  LOG(WARNING) << "Ignoring the launch group operation as the "
<< "executor is shutting down";
   return;
 }
@@ -373,7 +373,7 @@ protected:
 // It is possible that the agent process failed after the connection was
 // established. Shutdown the executor if this happens.
 if (state == DISCONNECTED || state == CONNECTED) {
-  LOG(ERROR) << "Unable to complete the launch operation "
+  LOG(ERROR) << "Unable to complete the launch group operation "
  << "as the executor is in state " << state;
   _shutdown();
   return;
@@ -506,7 +506,7 @@ protected:
   const Future& responses)
   {
 if (shuttingDown) {
-  LOG(WARNING) << "Ignoring the launch operation as the "
+  LOG(WARNING) << "Ignoring the launch group operation as the "
<< "executor is shutting down";
   return;
 }



[7/7] mesos git commit: Added MESOS-8468 to the 1.5.1 CHANGELOG.

2018-02-14 Thread qianzhang
Added MESOS-8468 to the 1.5.1 CHANGELOG.


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

Branch: refs/heads/1.5.x
Commit: 9840ae195683f218482526b89cb1df3f9072f5da
Parents: 4b4d737
Author: Qian Zhang 
Authored: Wed Feb 14 20:53:31 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 21:06:40 2018 +0800

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/9840ae19/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 408eff8..45c41a7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,7 @@ Release Notes - Mesos - Version 1.5.1 (WIP)
  * [MESOS-7742] - Race conditions in IOSwitchboard: listening on unix socket 
and premature closing of the connection.
  * [MESOS-8125] - Agent should properly handle recovering an executor when its 
pid is reused.
  * [MESOS-8411] - Killing a queued task can lead to the command executor never 
terminating.
+ * [MESOS-8468] - `LAUNCH_GROUP` failure tears down the default executor.
  * [MESOS-8510] - URI disk profile adaptor does not consider plugin type for a 
profile.
  * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
  * [MESOS-8565] - Persistent volumes are not visible in Mesos UI when 
launching a pod using default executor.



[2/7] mesos git commit: Made default executor not shutdown if unsubscribed during task launch.

2018-02-14 Thread qianzhang
Made default executor not shutdown if unsubscribed during task launch.

The default executor would unnecessarily shutdown if, while launching a
task group, it gets unsubscribed after having successfully launched the
task group's containers.

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


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

Branch: refs/heads/1.5.x
Commit: 24b8b43d9599b3cff58b7153d9b5e854d7bbb811
Parents: 2459ea1
Author: Gaston Kleiman 
Authored: Wed Feb 14 14:35:01 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 20:58:10 2018 +0800

--
 src/launcher/default_executor.cpp | 24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/24b8b43d/src/launcher/default_executor.cpp
--
diff --git a/src/launcher/default_executor.cpp 
b/src/launcher/default_executor.cpp
index 9aab90d..ea9b2d4 100644
--- a/src/launcher/default_executor.cpp
+++ b/src/launcher/default_executor.cpp
@@ -534,16 +534,6 @@ protected:
   }
 }
 
-// This could happen if the agent process failed after the child
-// containers were launched. Shutdown the executor if this happens.
-if (state == DISCONNECTED || state == CONNECTED) {
-  LOG(ERROR) << "Unable to complete the operation of launching child "
- << "containers as the executor is in state " << state;
-  _shutdown();
-  return;
-}
-
-CHECK_EQ(SUBSCRIBED, state);
 CHECK(launched);
 CHECK_EQ(containerIds.size(), (size_t) taskGroup.tasks().size());
 
@@ -643,7 +633,17 @@ protected:
   << stringify(taskIds()) << " in child containers "
   << stringify(containerIds);
 
-wait(taskIds());
+if (state == SUBSCRIBED) {
+  // `wait()` requires the executor to be subscribed.
+  //
+  // Upon subscription, `received()` will call `wait()` on all containers,
+  // so it is safe to skip it here if we are not subscribed.
+  wait(taskIds());
+} else {
+  LOG(INFO) << "Skipped waiting on child containers of tasks "
+<< stringify(taskIds()) << " until the connection "
+<< "to the agent is reestablished";
+}
   }
 
   void wait(const list& taskIds)
@@ -652,6 +652,8 @@ protected:
 CHECK(launched);
 CHECK_SOME(connectionId);
 
+LOG(INFO) << "Waiting on child containers of tasks " << stringify(taskIds);
+
 list connections;
 for (size_t i = 0; i < taskIds.size(); i++) {
   connections.push_back(process::http::connect(agent));



[5/7] mesos git commit: Made the default executor treat agent disconnections more gracefully.

2018-02-14 Thread qianzhang
Made the default executor treat agent disconnections more gracefully.

This patch makes the default executor not shutdown if there are active
child containers, and it fails to connect or is not subscribed to the
agent when starting to launch a task group.

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


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

Branch: refs/heads/1.5.x
Commit: f9f8d6b86ffecc216fc37b6191a1b786ab8842c4
Parents: e5afcbe
Author: Gaston Kleiman 
Authored: Wed Feb 14 14:35:22 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 21:06:40 2018 +0800

--
 src/launcher/default_executor.cpp | 43 +++---
 1 file changed, 35 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/f9f8d6b8/src/launcher/default_executor.cpp
--
diff --git a/src/launcher/default_executor.cpp 
b/src/launcher/default_executor.cpp
index 16977b5..ff437bc 100644
--- a/src/launcher/default_executor.cpp
+++ b/src/launcher/default_executor.cpp
@@ -366,19 +366,33 @@ protected:
 }
 
 if (!connection.isReady()) {
-  LOG(ERROR)
-<< "Unable to establish connection with the agent: "
-<< (connection.isFailed() ? connection.failure() : "discarded");
-  _shutdown();
+  LOG(WARNING) << "Unable to establish connection with the agent to "
+   << "complete the launch group operation: "
+   << (connection.isFailed() ? connection.failure()
+ : "discarded");
+  dropTaskGroup(taskGroup);
+
+  // Shutdown the executor if all the active child containers have
+  // terminated.
+  if (containers.empty()) {
+_shutdown();
+  }
+
   return;
 }
 
 // It is possible that the agent process failed after the connection was
-// established. Shutdown the executor if this happens.
+// established. Drop the task group if this happens.
 if (state == DISCONNECTED || state == CONNECTED) {
-  LOG(ERROR) << "Unable to complete the launch group operation "
- << "as the executor is in state " << state;
-  _shutdown();
+  LOG(WARNING) << "Unable to complete the launch group operation "
+   << "as the executor is in state " << state;
+  dropTaskGroup(taskGroup);
+
+  // Shutdown the executor if all the active child containers have
+  // terminated.
+  if (containers.empty()) {
+_shutdown();
+  }
   return;
 }
 
@@ -1515,6 +1529,19 @@ private:
 taskId);
   }
 
+  void dropTaskGroup(const TaskGroupInfo& taskGroup)
+  {
+TaskState taskState =
+  protobuf::frameworkHasCapability(
+  frameworkInfo.get(), FrameworkInfo::Capability::PARTITION_AWARE)
+? TASK_DROPPED
+: TASK_LOST;
+
+foreach (const TaskInfo& task, taskGroup.tasks()) {
+  forward(createTaskStatus(task.task_id(), taskState));
+}
+  }
+
   enum State
   {
 CONNECTED,



[3/3] mesos-site git commit: Updated the website built from mesos SHA: 632ff7f.

2018-02-14 Thread git-site-role
Updated the website built from mesos SHA: 632ff7f.


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

Branch: refs/heads/asf-site
Commit: 219b60ccdd1dc8d6a26caac55896ed2e9359ded7
Parents: 8b64bd2
Author: jenkins 
Authored: Wed Feb 14 13:13:24 2018 +
Committer: jenkins 
Committed: Wed Feb 14 13:13:24 2018 +

--
 content/api/latest/c++/Nodes.xml|  10 +
 content/api/latest/c++/Tokens.xml   |  44 ++
 .../c++/include_2mesos_2v1_2mesos_8hpp.html |   2 +
 .../include_2mesos_2v1_2mesos_8hpp_source.html  | 748 ++-
 content/api/latest/c++/index.hhc|   2 +
 .../api/latest/c++/namespacemembers_0x6f.html   | 175 ++---
 .../latest/c++/namespacemembers_func_0x6f.html  | 165 ++--
 .../api/latest/c++/namespacemesos_1_1v1.html|  40 +-
 .../c++/namespacemesos_1_1v1_1_1scheduler.html  |  36 +
 .../c++/v1_2scheduler_2scheduler_8hpp.html  |   3 +
 .../v1_2scheduler_2scheduler_8hpp_source.html   |  60 +-
 content/blog/feed.xml   |   2 +-
 .../index.html  |   2 +-
 13 files changed, 713 insertions(+), 576 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/219b60cc/content/api/latest/c++/Nodes.xml
--
diff --git a/content/api/latest/c++/Nodes.xml b/content/api/latest/c++/Nodes.xml
index 8ce991d..b636bfb 100644
--- a/content/api/latest/c++/Nodes.xml
+++ b/content/api/latest/c++/Nodes.xml
@@ -63630,6 +63630,11 @@
   v1_2scheduler_2scheduler_8hpp.html
   ae53a54b2e422632360159a2fde353f4e
  
+ 
+  operator
+  v1_2scheduler_2scheduler_8hpp.html
+  aca028caa0ea68f761960c7ce1cde244f
+ 
 

   
@@ -64296,6 +64301,11 @@

 operator
 include_2mesos_2v1_2mesos_8hpp.html
+ae505f324abbd8c97e9cbdece64978e29
+   
+   
+operator
+include_2mesos_2v1_2mesos_8hpp.html
 a234cb405ecc6325a385a48c08aae980a



http://git-wip-us.apache.org/repos/asf/mesos-site/blob/219b60cc/content/api/latest/c++/Tokens.xml
--
diff --git a/content/api/latest/c++/Tokens.xml 
b/content/api/latest/c++/Tokens.xml
index d57e06f..d6ab9ef 100644
--- a/content/api/latest/c++/Tokens.xml
+++ b/content/api/latest/c++/Tokens.xml
@@ -12480,6 +12480,17 @@
   mesos::v1
 
 namespacemesos_1_1v1.html
+ae505f324abbd8c97e9cbdece64978e29
+mesos.hpp
+  
+  
+
+  operator
+  cpp
+  func
+  mesos::v1
+
+namespacemesos_1_1v1.html
 a234cb405ecc6325a385a48c08aae980a
 mesos.hpp
   
@@ -15448,6 +15459,17 @@
   
   
 
+  operator
+  cpp
+  func
+  mesos::v1::scheduler
+
+namespacemesos_1_1v1_1_1scheduler.html
+aca028caa0ea68f761960c7ce1cde244f
+scheduler.hpp
+  
+  
+
   LOG_BASED_ON_CLASS
   unknown
   macro
@@ -154612,6 +154634,17 @@
   mesos::v1
 
 namespacemesos_1_1v1.html
+ae505f324abbd8c97e9cbdece64978e29
+mesos.hpp
+  
+  
+
+  operator
+  cpp
+  func
+  mesos::v1
+
+namespacemesos_1_1v1.html
 a234cb405ecc6325a385a48c08aae980a
 mesos.hpp
   
@@ -156997,6 +157030,17 @@
   
   
 
+  operator
+  cpp
+  func
+  mesos::v1::scheduler
+
+namespacemesos_1_1v1_1_1scheduler.html
+aca028caa0ea68f761960c7ce1cde244f
+scheduler.hpp
+  
+  
+
   DEFAULT_CONNECTION_DELAY_MAX
   cpp
   data

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/219b60cc/content/api/latest/c++/include_2mesos_2v1_2mesos_8hpp.html
--
diff --git a/content/api/latest/c++/include_2mesos_2v1_2mesos_8hpp.html 
b/content/api/latest/c++/include_2mesos_2v1_2mesos_8hpp.html
index 2b0e582..5e86551 100644
--- a/content/api/latest/c++/include_2mesos_2v1_2mesos_8hpp.html
+++ b/content/api/latest/c++/include_2mesos_2v1_2mesos_8hpp.html
@@ -263,6 +263,8 @@ Functions
 
 std::ostream mesos::v1::operator
 (std::ostream stream, const ResourceProviderInfo 
resourceProviderInfo)
 
+std::ostream mesos::v1::operator
 (std::ostream stream, const TaskStatus status)
+
 

[2/3] mesos-site git commit: Updated the website built from mesos SHA: 632ff7f.

2018-02-14 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/219b60cc/content/api/latest/c++/include_2mesos_2v1_2mesos_8hpp_source.html
--
diff --git a/content/api/latest/c++/include_2mesos_2v1_2mesos_8hpp_source.html 
b/content/api/latest/c++/include_2mesos_2v1_2mesos_8hpp_source.html
index 7a461ca..7826025 100644
--- a/content/api/latest/c++/include_2mesos_2v1_2mesos_8hpp_source.html
+++ b/content/api/latest/c++/include_2mesos_2v1_2mesos_8hpp_source.html
@@ -445,410 +445,414 @@
   395 
   const ResourceProviderInfo 
resourceProviderInfo);
   
396
   
397
-  
398std::ostream operator(std::ostream
 stream, const AgentID agentId);
+  
398std::ostream operator(std::ostream
 stream, const TaskStatus status);
   
399
   
400
-  
401std::ostream operator(std::ostream
 stream, const AgentInfo agent);
+  
401std::ostream operator(std::ostream
 stream, const AgentID agentId);
   
402
   
403
-  
404std::ostream operator(std::ostream
 stream, const TaskID taskId);
+  
404std::ostream operator(std::ostream
 stream, const AgentInfo agent);
   
405
   
406
-  
407std::ostream operator(std::ostream
 stream, const MachineID machineId);
+  
407std::ostream operator(std::ostream
 stream, const TaskID taskId);
   
408
   
409
-  
410std::ostream operator(std::ostream
 stream, const TaskInfo task);
+  
410std::ostream operator(std::ostream
 stream, const MachineID machineId);
   
411
   
412
-  
413std::ostream operator(
-  414 
   std::ostream stream,
-  415 
   const TaskGroupInfo taskGroupInfo);
-  
416
-  
417
-  
418std::ostream operator(std::ostream
 stream, const TaskState state);
+  
413std::ostream operator(std::ostream
 stream, const TaskInfo task);
+  
414
+  
415
+  
416std::ostream operator(
+  417 
   std::ostream stream,
+  418 
   const TaskGroupInfo taskGroupInfo);
   
419
   
420
-  
421std::ostream operator(std::ostream
 stream, const CheckInfo::Type
 type);
+  
421std::ostream operator(std::ostream
 stream, const TaskState state);
   
422
   
423
-  
424std::ostream operator(
-  425 
   std::ostream stream,
-  426 
   const CSIPluginContainerInfo::Service 
service);
-  
427
-  
428
-  
429std::ostream operator(
-  430 
   std::ostream stream,
-  431 
   const FrameworkInfo::Capability
 capability);
-  
432
-  
433
-  
434std::ostream operator(std::ostream
 stream, const Image::Type
 imageType);
+  
424std::ostream operator(std::ostream
 stream, const CheckInfo::Type
 type);
+  
425
+  
426
+  
427std::ostream operator(
+  428 
   std::ostream stream,
+  429 
   const CSIPluginContainerInfo::Service 
service);
+  
430
+  
431
+  
432std::ostream operator(
+  433 
   std::ostream stream,
+  434 
   const FrameworkInfo::Capability
 capability);
   
435
   
436
-  
437std::ostream operator(std::ostream
 stream, const Secret::Type
 secretType);
+  
437std::ostream operator(std::ostream
 stream, const Image::Type
 imageType);
   
438
   
439
-  
440std::ostream operator(
-  441 
   std::ostream stream,
-  442 
   const Offer::Operation::Type
 operationType);
-  
443
-  
444
-  
445std::ostream operator(
-  446 
   std::ostream stream,
-  447 
   const Resource::DiskInfo::Source::Type
 sourceType);
-  
448
-  
449
-  
450template typename T
-  
451inline std::ostream operator(
-  452 
   std::ostream stream,
-  453 
   const 
google::protobuf::RepeatedPtrFieldT messages)
-  
454{
-  455 
 stream  [ ;
-  456 
 for (auto it = 
messages.begin(); it != messages.end(); ++it) {
-  457 
   if (it != messages.begin()) {
-  458 
 stream  , ;
-  459 
   }
-  460 
   stream  *it;
-  461 
 }
-  462 
 stream   ];
-  463 
 return stream;
-  
464}
-  
465
-  
466
-  
467template typename T
-  
468inline std::ostream operator(
-  469 
   std::ostream stream,
-  470 
   const std::vectorT messages)
-  
471{
-  472 
 stream  [ ;
-  473 
 for (auto it = 
messages.begin(); it != messages.end(); ++it) {
-  474 
   if (it != messages.begin()) {
-  475 
 stream  , ;
-  476 
   }
-  477 
   stream  *it;
-  478 
 }
-  479 
 stream   ];
-  480 
 return stream;
-  
481}
-  
482
-  
483
-  
484std::ostream operator(
-  485 
   std::ostream stream,
-  486 
   const hashmapstd::string, std::string map);
-  
487
-  
488} // namespace v1 {
-  
489} // namespace mesos {
+  
440std::ostream operator(std::ostream
 stream, const Secret::Type
 secretType);
+  
441
+  
442
+  
443std::ostream operator(
+  444 
   std::ostream stream,
+  445 
   const Offer::Operation::Type
 operationType);
+  
446
+  
447
+  
448std::ostream operator(
+  449 
   std::ostream stream,
+  450 
   const Resource::DiskInfo::Source::Type
 sourceType);
+  
451
+  
452
+  
453template typename T
+  
454inline std::ostream operator(
+  455 
   std::ostream stream,
+  456 
   const 
google::protobuf::RepeatedPtrFieldT messages)
+  
457{
+  458 
 stream  [ ;
+  459 
 for (auto it = 
messages.begin(); it != messages.end(); ++it) {
+  460 
   if (it != messages.begin()) {
+  461 
 stream  , ;
+  462 
   

[1/3] mesos-site git commit: Updated the website built from mesos SHA: 632ff7f.

2018-02-14 Thread git-site-role
Repository: mesos-site
Updated Branches:
  refs/heads/asf-site 8b64bd2fc -> 219b60ccd


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/219b60cc/content/api/latest/c++/index.hhc
--
diff --git a/content/api/latest/c++/index.hhc b/content/api/latest/c++/index.hhc
index 1dafd27..9f6146a 100644
--- a/content/api/latest/c++/index.hhc
+++ b/content/api/latest/c++/index.hhc
@@ -16966,6 +16966,7 @@
   
   
   
+  
   
 
   
@@ -17137,6 +17138,7 @@
 
 
 
+
 
 
 

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/219b60cc/content/api/latest/c++/namespacemembers_0x6f.html
--
diff --git a/content/api/latest/c++/namespacemembers_0x6f.html 
b/content/api/latest/c++/namespacemembers_0x6f.html
index 00853a5..81b2102 100644
--- a/content/api/latest/c++/namespacemembers_0x6f.html
+++ b/content/api/latest/c++/namespacemembers_0x6f.html
@@ -157,125 +157,130 @@
 
 operator()
 : mesos
+, mesos::internal::slave
+, process::network::inet
+, mesos
 , process::network::unix
 , process::http::authentication
-, mesos
+, mesos
 , process
 , process::http
-, mesos
+, mesos
 , process::http::authentication
 , process
-, mesos
-, process
 , mesos
-, process
+, process
 , mesos
-, flags
+, process
 , mesos
-, net
+, flags
 , mesos
-, JSON
+, net
 , mesos
-, JSON
+, JSON
 , mesos
-, JSON
+, JSON
 , mesos
+, JSON
+, mesos
 , JSON
 , net
-, mesos
-, os
 , mesos
-, proc
+, os
 , mesos
+, proc
+, mesos
 , mesos::v1::agent
 , mesos::v1
 , mesos::v1::executor
 , mesos::v1::master
 , mesos::v1
-, process::network::inet
-, mesos::internal::slave
+, mesos::internal::slave
 , mesos::v1
-, mesos::internal::slave
-, mesos::internal::slave::cni::spec
+, mesos::internal::slave
 , mesos::v1
-, mesos::internal::slave
-, mesos::internal
+, mesos::internal
 , mesos::v1
-, mesos::internal
+, mesos::internal::log
 , mesos::v1
-, mesos::internal
-, mesos::v1
+, mesos::internal
 , mesos::internal::master
+, mesos::v1
+, routing
+, routing::filter::ip
 , mesos::v1
-, cgroups::devices
-, mesos::v1
+, cgroups::devices
 , cgroups::memory::pressure
+, mesos::v1
+, cgroups::blkio
 , mesos::v1
-, mesos::internal::capabilities
-, mesos::v1
+, mesos::internal::capabilities
+, mesos::csi::state
 , csi
-, mesos::v1
-, zookeeper
+, mesos::v1
+, csi
+, mesos::internal::protobuf::slave
+, mesos::v1
 , mesos
-, mesos::v1
-, mesos
-, mesos::v1
-, mesos::v1::scheduler
-, mesos::v1
-, mesos::v1::resource_provider
-, mesos::v1
+, mesos::v1
+, mesos::v1::scheduler
+, mesos::v1
 , mesos::v1::resource_provider
+, mesos::v1
+, mesos::v1::resource_provider
 , mesos::v1
 , mesos::agent
-, mesos::v1::scheduler
+, mesos::v1
 , mesos
-, mesos::v1
+, mesos::v1
 , docker::spec
 , mesos::executor
-, mesos
+, mesos
 , mesos::executor
 , mesos
-, mesos::internal::protobuf::slave
-, csi
+, zookeeper
 , mesos::master
-, mesos::csi::state
+, csi
 , mesos::master
 , mesos
-, cgroups::blkio
+, mesos::internal::capabilities
 , mesos::resource_provider
-, cgroups::blkio
+, cgroups::blkio
 , mesos::resource_provider
-, cgroups::devices
+, cgroups::blkio
 , mesos
-, routing::filter::ip
-, routing
+, cgroups::devices
 , mesos
-, mesos::internal
+, mesos::internal::master
 , mesos::scheduler
-, mesos::internal::log
+, mesos::internal
 , mesos
-, mesos::internal
+, mesos::internal
 , mesos
-, mesos::internal::slave
+, mesos::internal
+, mesos::internal::slave
 , mesos
-, mesos::internal::slave
+, mesos::internal::slave::cni::spec
 , mesos
 
 operator=()
-: mesos
+: mesos::v1
+, os
 , mesos::v1
-, mesos
-, os
+, mesos
+, mesos::v1
+, mesos
 , mesos::internal::slave
+, os
 
 operator==()
 : mesos
 , mesos::v1
-, mesos
+, mesos
 , os
 , mesos
-, mesos::internal
-, mesos
+, mesos::v1
+, mesos
 , mesos::v1
 , mesos
 , mesos::internal
@@ -287,11 +292,10 @@
 , csi
 , mesos::v1
 , mesos
-, mesos::v1
+, mesos::v1
 , mesos
 , mesos::v1
-, mesos
-, os
+, mesos
 , mesos::v1
 , mesos
 , mesos::v1
@@ -300,60 +304,57 @@
 , mesos::internal::slave
 , mesos::v1
 , mesos::internal::xfs
-, mesos
-, mesos::v1
+, mesos::internal::protobuf::slave
+, JSON
 , mesos
-, mesos::v1
+, mesos::internal
+, mesos
 , proc
 , mesos
-, mesos::v1
-, mesos
-, mesos::v1
-, mesos
-, mesos::v1
-, mesos
+, mesos::v1
+, mesos
 , mesos::v1
-, mesos
+, mesos
+, mesos::v1
+, mesos
+, mesos::v1
+, os
+, mesos
 , mesos::v1
+, mesos
 , process
 , mesos
 , mesos::v1
 , cgroups::devices
 , mesos
-, mesos::v1
+, mesos::v1
 , mesos
 , mesos::v1
 , mesos
-, JSON
-, mesos::v1
 , os
-, mesos::v1
+, mesos::v1
 , mesos
 , mesos::v1
-, mesos
-, mesos::v1
-, mesos
-, mesos::v1
 , mesos
 , mesos::internal::slave
 , mesos::v1
 , mesos
 , csi
-, mesos
+, mesos
 , mesos::v1
-, mesos
-, mesos::v1
-, mesos::internal::protobuf::slave
-, mesos
+, mesos
+, mesos::v1

mesos git commit: Added MESOS-8468 to the 1.5.1 CHANGELOG.

2018-02-14 Thread qianzhang
Repository: mesos
Updated Branches:
  refs/heads/master 632ff7f7f -> e36e3b998


Added MESOS-8468 to the 1.5.1 CHANGELOG.


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

Branch: refs/heads/master
Commit: e36e3b9989b1097dca9597097dd51d24aaba48fa
Parents: 632ff7f
Author: Qian Zhang 
Authored: Wed Feb 14 20:53:31 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 20:54:26 2018 +0800

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/e36e3b99/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 3b4b49d..e2756af 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,7 @@ Release Notes - Mesos - Version 1.5.1 (WIP)
  * [MESOS-7742] - Race conditions in IOSwitchboard: listening on unix socket 
and premature closing of the connection.
  * [MESOS-8125] - Agent should properly handle recovering an executor when its 
pid is reused.
  * [MESOS-8411] - Killing a queued task can lead to the command executor never 
terminating.
+ * [MESOS-8468] - `LAUNCH_GROUP` failure tears down the default executor.
  * [MESOS-8510] - URI disk profile adaptor does not consider plugin type for a 
profile.
  * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
  * [MESOS-8565] - Persistent volumes are not visible in Mesos UI when 
launching a pod using default executor.



[4/7] mesos git commit: Added a regression test for MESOS-8468.

2018-02-14 Thread qianzhang
Added a regression test for MESOS-8468.

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


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

Branch: refs/heads/master
Commit: 656196eeca4ab6449c4b9f329b5b9cac2f69a885
Parents: c3f3542
Author: Gaston Kleiman 
Authored: Wed Feb 14 14:35:17 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 20:37:31 2018 +0800

--
 src/tests/default_executor_tests.cpp | 252 ++
 1 file changed, 252 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/656196ee/src/tests/default_executor_tests.cpp
--
diff --git a/src/tests/default_executor_tests.cpp 
b/src/tests/default_executor_tests.cpp
index cc97e0d..c349237 100644
--- a/src/tests/default_executor_tests.cpp
+++ b/src/tests/default_executor_tests.cpp
@@ -3209,6 +3209,258 @@ TEST_P_TEMP_DISABLED_ON_WINDOWS(
   EXPECT_SOME_EQ("abc\n", os::read(filePath));
 }
 
+
+// This is a regression test for MESOS-8468. It verifies that upon a
+// `LAUNCH_GROUP` failure the default executor kills the corresponding task
+// group, but that it doesn't affect tasks from other task groups.
+TEST_P_TEMP_DISABLED_ON_WINDOWS(DefaultExecutorTest, ROOT_LaunchGroupFailure)
+{
+  Try master = StartMaster();
+  ASSERT_SOME(master);
+
+  // Configure the agent in such a way that tasks requiring an appc image will
+  // pass validation (won't result in a TASK_ERROR), but will trigger a
+  // `LAUNCH_NESTED_CONTAINER` failure.
+  slave::Flags flags = CreateSlaveFlags();
+  flags.containerizers = GetParam();
+  flags.isolation = "filesystem/linux";
+  flags.image_providers = "APPC";
+
+  Owned detector = master.get()->createDetector();
+  Try slave = StartSlave(detector.get(), flags);
+  ASSERT_SOME(slave);
+
+  auto scheduler = std::make_shared();
+
+  EXPECT_CALL(*scheduler, connected(_))
+.WillOnce(v1::scheduler::SendSubscribe(v1::DEFAULT_FRAMEWORK_INFO));
+
+  Future subscribed;
+  EXPECT_CALL(*scheduler, subscribed(_, _))
+.WillOnce(FutureArg<1>());
+
+  Future offers;
+  EXPECT_CALL(*scheduler, offers(_, _))
+.WillOnce(FutureArg<1>())
+.WillRepeatedly(Return()); // Ignore subsequent offers.
+
+  EXPECT_CALL(*scheduler, heartbeat(_))
+.WillRepeatedly(Return()); // Ignore heartbeats.
+
+  v1::scheduler::TestMesos mesos(
+  master.get()->pid,
+  ContentType::PROTOBUF,
+  scheduler);
+
+  AWAIT_READY(subscribed);
+  v1::FrameworkID frameworkId(subscribed->framework_id());
+
+  v1::Resources resources =
+v1::Resources::parse("cpus:0.1;mem:32;disk:32").get();
+
+  AWAIT_READY(offers);
+  ASSERT_FALSE(offers->offers().empty());
+
+  const v1::Offer& offer = offers->offers(0);
+  const v1::AgentID& agentId = offer.agent_id();
+
+  v1::TaskInfo sleepTaskInfo1 = v1::createTask(
+  agentId,
+  resources,
+  SLEEP_COMMAND(1000),
+  None(),
+  "sleepTask1",
+  "sleepTask1");
+
+  v1::TaskGroupInfo taskGroup1 =
+v1::createTaskGroupInfo({sleepTaskInfo1});
+
+  v1::TaskInfo sleepTaskInfo2 = v1::createTask(
+  agentId,
+  resources,
+  SLEEP_COMMAND(1000),
+  None(),
+  "sleepTask2",
+  "sleepTask2");
+
+  // Create a task that requires an appc image. The agent wasn't configured to
+  // support appc, so it should trigger a `LAUNCH_NESTED_CONTAINER` failure.
+  v1::TaskInfo failingTaskInfo = v1::createTask(
+  agentId,
+  resources,
+  SLEEP_COMMAND(1000),
+  None(),
+  "failingTask",
+  "failingTask");
+
+  mesos::v1::ContainerInfo* container = failingTaskInfo.mutable_container();
+  container->set_type(mesos::v1::ContainerInfo::MESOS);
+
+  mesos::v1::Image* image = container->mutable_mesos()->mutable_image();
+  image->set_type(mesos::v1::Image::APPC);
+  image->mutable_appc()->set_name("foobar");
+
+  v1::TaskGroupInfo taskGroup2 =
+v1::createTaskGroupInfo({sleepTaskInfo2, failingTaskInfo});
+
+  testing::Sequence sleepTask1;
+  Future sleepTaskStartingUpdate1;
+  Future sleepTaskRunningUpdate1;
+  Future sleepTaskKilledUpdate1;
+
+  EXPECT_CALL(
+  *scheduler,
+  update(_, AllOf(
+  TaskStatusUpdateTaskIdEq(sleepTaskInfo1),
+  TaskStatusUpdateStateEq(v1::TASK_STARTING
+.InSequence(sleepTask1)
+.WillOnce(
+DoAll(
+FutureArg<1>(),
+v1::scheduler::SendAcknowledge(frameworkId, agentId)));
+
+  EXPECT_CALL(
+  *scheduler,
+  update(_, AllOf(
+  TaskStatusUpdateTaskIdEq(sleepTaskInfo1),
+  TaskStatusUpdateStateEq(v1::TASK_RUNNING
+

[1/7] mesos git commit: Improved some default executor log messages.

2018-02-14 Thread qianzhang
Repository: mesos
Updated Branches:
  refs/heads/master 103d6e06a -> 632ff7f7f


Improved some default executor log messages.

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


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

Branch: refs/heads/master
Commit: 2e570b709dc7d15c73c8d728ef0b32e2416b0a08
Parents: 29d1e4e
Author: Gaston Kleiman 
Authored: Wed Feb 14 14:34:56 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 20:34:56 2018 +0800

--
 src/launcher/default_executor.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/2e570b70/src/launcher/default_executor.cpp
--
diff --git a/src/launcher/default_executor.cpp 
b/src/launcher/default_executor.cpp
index 4a61985..635df52 100644
--- a/src/launcher/default_executor.cpp
+++ b/src/launcher/default_executor.cpp
@@ -357,7 +357,7 @@ protected:
   const Future& connection)
   {
 if (shuttingDown) {
-  LOG(WARNING) << "Ignoring the launch operation as the "
+  LOG(WARNING) << "Ignoring the launch group operation as the "
<< "executor is shutting down";
   return;
 }
@@ -373,7 +373,7 @@ protected:
 // It is possible that the agent process failed after the connection was
 // established. Shutdown the executor if this happens.
 if (state == DISCONNECTED || state == CONNECTED) {
-  LOG(ERROR) << "Unable to complete the launch operation "
+  LOG(ERROR) << "Unable to complete the launch group operation "
  << "as the executor is in state " << state;
   _shutdown();
   return;
@@ -506,7 +506,7 @@ protected:
   const Future& responses)
   {
 if (shuttingDown) {
-  LOG(WARNING) << "Ignoring the launch operation as the "
+  LOG(WARNING) << "Ignoring the launch group operation as the "
<< "executor is shutting down";
   return;
 }



[7/7] mesos git commit: Stopped shutting down the whole default executor on task launch failure.

2018-02-14 Thread qianzhang
Stopped shutting down the whole default executor on task launch failure.

The default executor would be completely shutdown on a
`LAUNCH_NESTED_CONTAINER` failure.

This patch makes it kill the affected task group instead of shutting
down and killing all task groups.

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


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

Branch: refs/heads/master
Commit: c3f3542e7ecce82cad8b75fdc2db14fe8c43a5da
Parents: 5c8852b
Author: Gaston Kleiman 
Authored: Wed Feb 14 14:35:11 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 20:37:31 2018 +0800

--
 src/launcher/default_executor.cpp | 165 -
 1 file changed, 103 insertions(+), 62 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/c3f3542e/src/launcher/default_executor.cpp
--
diff --git a/src/launcher/default_executor.cpp 
b/src/launcher/default_executor.cpp
index 2f6d1f8..16977b5 100644
--- a/src/launcher/default_executor.cpp
+++ b/src/launcher/default_executor.cpp
@@ -108,6 +108,9 @@ private:
 // `WAIT_NESTED_CONTAINER` call has not been established yet.
 Option waiting;
 
+// Error returned by the agent while trying to launch the container.
+Option launchError;
+
 // TODO(bennoe): Create a real state machine instead of adding
 // more and more ad-hoc boolean values.
 
@@ -420,6 +423,7 @@ protected:
 None(),
 None(),
 None(),
+None(),
 false,
 false,
 false,
@@ -522,28 +526,32 @@ protected:
   return;
 }
 
-// Check if we received a 200 OK response for all the
-// `LAUNCH_NESTED_CONTAINER` calls. Shutdown the executor
-// if this is not the case.
-foreach (const Response& response, responses.get()) {
-  if (response.code != process::http::Status::OK) {
-LOG(ERROR) << "Received '" << response.status << "' ("
-   << response.body << ") while launching child container";
-_shutdown();
-return;
-  }
-}
-
 CHECK(launched);
 CHECK_EQ(containerIds.size(), (size_t) taskGroup.tasks().size());
+CHECK_EQ(containerIds.size(), responses->size());
 
 int index = 0;
+auto responseIterator = responses->begin();
 foreach (const ContainerID& containerId, containerIds) {
   const TaskInfo& task = taskGroup.tasks().Get(index++);
   const TaskID& taskId = task.task_id();
+  const Response& response = *(responseIterator++);
 
   CHECK(containers.contains(taskId));
-  containers.at(taskId)->launched = true;
+  Container* container = containers.at(taskId).get();
+
+  // Check if we received a 200 OK response for the
+  // `LAUNCH_NESTED_CONTAINER` call. Skip the rest of the container
+  // initialization if this is not the case.
+  if (response.code != process::http::Status::OK) {
+LOG(ERROR) << "Received '" << response.status << "' (" << response.body
+   << ") while launching child container " << containerId
+   << " of task '" << taskId << "'";
+container->launchError = response.body;
+continue;
+  }
+
+  container->launched = true;
 
   if (task.has_check()) {
 Try checker =
@@ -563,7 +571,7 @@ protected:
   return;
 }
 
-containers.at(taskId)->checker = checker.get();
+container->checker = checker.get();
   }
 
   if (task.has_health_check()) {
@@ -585,7 +593,7 @@ protected:
   return;
 }
 
-containers.at(taskId)->healthChecker = healthChecker.get();
+container->healthChecker = healthChecker.get();
   }
 
   // Currently, the Mesos agent does not expose the mapping from
@@ -611,13 +619,8 @@ protected:
<< containerId << " of task '" << taskId << "' due to: "
<< symlink.error();
   }
-}
 
-// Send a TASK_RUNNING status update now that the task group has
-// been successfully launched.
-foreach (const TaskInfo& task, taskGroup.tasks()) {
-  const TaskStatus status = createTaskStatus(task.task_id(), TASK_RUNNING);
-  forward(status);
+  forward(createTaskStatus(task.task_id(), TASK_RUNNING));
 }
 
 auto taskIds = []() {
@@ -629,7 +632,7 @@ protected:
 };
 
 LOG(INFO)
-  << "Successfully launched tasks "
+  << "Finished launching tasks "
   << stringify(taskIds()) << " in child containers "
   << stringify(containerIds);
 
@@ -786,9 +789,12 @@ protected:
   return;
   

[2/7] mesos git commit: Added `Event::Update` and `v1::scheduler::TaskStatus` ostream operators.

2018-02-14 Thread qianzhang
Added `Event::Update` and `v1::scheduler::TaskStatus` ostream operators.

This operators make gtest print a human-readable representation of the
protos on test failures.

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


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

Branch: refs/heads/master
Commit: 29d1e4e1a1b894da78c2033f1932b282ee794f4b
Parents: 103d6e0
Author: Gaston Kleiman 
Authored: Wed Feb 14 14:34:50 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 20:34:56 2018 +0800

--
 include/mesos/v1/mesos.hpp   |  3 +++
 include/mesos/v1/scheduler/scheduler.hpp | 10 
 src/v1/mesos.cpp | 37 +++
 3 files changed, 50 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/29d1e4e1/include/mesos/v1/mesos.hpp
--
diff --git a/include/mesos/v1/mesos.hpp b/include/mesos/v1/mesos.hpp
index d4c354a..f16568e 100644
--- a/include/mesos/v1/mesos.hpp
+++ b/include/mesos/v1/mesos.hpp
@@ -395,6 +395,9 @@ std::ostream& operator<<(
 const ResourceProviderInfo& resourceProviderInfo);
 
 
+std::ostream& operator<<(std::ostream& stream, const TaskStatus& status);
+
+
 std::ostream& operator<<(std::ostream& stream, const AgentID& agentId);
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/29d1e4e1/include/mesos/v1/scheduler/scheduler.hpp
--
diff --git a/include/mesos/v1/scheduler/scheduler.hpp 
b/include/mesos/v1/scheduler/scheduler.hpp
index 2fdd8f2..ab94462 100644
--- a/include/mesos/v1/scheduler/scheduler.hpp
+++ b/include/mesos/v1/scheduler/scheduler.hpp
@@ -19,6 +19,8 @@
 
 #include 
 
+#include 
+
 // ONLY USEFUL AFTER RUNNING PROTOC.
 #include 
 
@@ -37,6 +39,14 @@ inline std::ostream& operator<<(std::ostream& stream, const 
Event::Type& type)
   return stream << Event::Type_Name(type);
 }
 
+
+inline std::ostream& operator<<(
+std::ostream& stream,
+const Event::Update& update)
+{
+  return stream << update.status();
+}
+
 } // namespace scheduler {
 } // namespace v1 {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/29d1e4e1/src/v1/mesos.cpp
--
diff --git a/src/v1/mesos.cpp b/src/v1/mesos.cpp
index 8abeae0..576f367 100644
--- a/src/v1/mesos.cpp
+++ b/src/v1/mesos.cpp
@@ -17,6 +17,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -600,6 +601,42 @@ ostream& operator<<(ostream& stream, const RLimitInfo& 
limits)
 }
 
 
+ostream& operator<<(ostream& stream, const TaskStatus& status)
+{
+  stream << status.state();
+
+  if (status.has_uuid()) {
+stream << " (Status UUID: "
+   << stringify(id::UUID::fromBytes(status.uuid()).get()) << ")";
+  }
+
+  if (status.has_source()) {
+stream << " Source: " << TaskStatus::Source_Name(status.source());
+  }
+
+  if (status.has_reason()) {
+stream << " Reason: " << TaskStatus::Reason_Name(status.reason());
+  }
+
+  if (status.has_message()) {
+stream << " Message: '" << status.message() << "'";
+  }
+
+  stream << " for task '" << status.task_id() << "'";
+
+  if (status.has_agent_id()) {
+stream << " on agent: " << status.agent_id() << "";
+  }
+
+  if (status.has_healthy()) {
+stream << " in health state "
+   << (status.healthy() ? "healthy" : "unhealthy");
+  }
+
+  return stream;
+}
+
+
 ostream& operator<<(ostream& stream, const AgentID& agentId)
 {
   return stream << agentId.value();



[3/7] mesos git commit: Made default executor not shutdown if unsubscribed during task launch.

2018-02-14 Thread qianzhang
Made default executor not shutdown if unsubscribed during task launch.

The default executor would unnecessarily shutdown if, while launching a
task group, it gets unsubscribed after having successfully launched the
task group's containers.

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


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

Branch: refs/heads/master
Commit: 5c8852b244b09b4ae57e00abcd940482927d57e6
Parents: 2e570b7
Author: Gaston Kleiman 
Authored: Wed Feb 14 14:35:01 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 20:37:27 2018 +0800

--
 src/launcher/default_executor.cpp | 24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/5c8852b2/src/launcher/default_executor.cpp
--
diff --git a/src/launcher/default_executor.cpp 
b/src/launcher/default_executor.cpp
index 635df52..2f6d1f8 100644
--- a/src/launcher/default_executor.cpp
+++ b/src/launcher/default_executor.cpp
@@ -534,16 +534,6 @@ protected:
   }
 }
 
-// This could happen if the agent process failed after the child
-// containers were launched. Shutdown the executor if this happens.
-if (state == DISCONNECTED || state == CONNECTED) {
-  LOG(ERROR) << "Unable to complete the operation of launching child "
- << "containers as the executor is in state " << state;
-  _shutdown();
-  return;
-}
-
-CHECK_EQ(SUBSCRIBED, state);
 CHECK(launched);
 CHECK_EQ(containerIds.size(), (size_t) taskGroup.tasks().size());
 
@@ -643,7 +633,17 @@ protected:
   << stringify(taskIds()) << " in child containers "
   << stringify(containerIds);
 
-wait(taskIds());
+if (state == SUBSCRIBED) {
+  // `wait()` requires the executor to be subscribed.
+  //
+  // Upon subscription, `received()` will call `wait()` on all containers,
+  // so it is safe to skip it here if we are not subscribed.
+  wait(taskIds());
+} else {
+  LOG(INFO) << "Skipped waiting on child containers of tasks "
+<< stringify(taskIds()) << " until the connection "
+<< "to the agent is reestablished";
+}
   }
 
   void wait(const list& taskIds)
@@ -652,6 +652,8 @@ protected:
 CHECK(launched);
 CHECK_SOME(connectionId);
 
+LOG(INFO) << "Waiting on child containers of tasks " << stringify(taskIds);
+
 list connections;
 for (size_t i = 0; i < taskIds.size(); i++) {
   connections.push_back(process::http::connect(agent));



[5/7] mesos git commit: Made the default executor treat agent disconnections more gracefully.

2018-02-14 Thread qianzhang
Made the default executor treat agent disconnections more gracefully.

This patch makes the default executor not shutdown if there are active
child containers, and it fails to connect or is not subscribed to the
agent when starting to launch a task group.

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


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

Branch: refs/heads/master
Commit: 54b6c5b9c7cb059ebd87ee0f9927cfa6ff73129d
Parents: 656196e
Author: Gaston Kleiman 
Authored: Wed Feb 14 14:35:22 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 20:37:31 2018 +0800

--
 src/launcher/default_executor.cpp | 43 +++---
 1 file changed, 35 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/54b6c5b9/src/launcher/default_executor.cpp
--
diff --git a/src/launcher/default_executor.cpp 
b/src/launcher/default_executor.cpp
index 16977b5..ff437bc 100644
--- a/src/launcher/default_executor.cpp
+++ b/src/launcher/default_executor.cpp
@@ -366,19 +366,33 @@ protected:
 }
 
 if (!connection.isReady()) {
-  LOG(ERROR)
-<< "Unable to establish connection with the agent: "
-<< (connection.isFailed() ? connection.failure() : "discarded");
-  _shutdown();
+  LOG(WARNING) << "Unable to establish connection with the agent to "
+   << "complete the launch group operation: "
+   << (connection.isFailed() ? connection.failure()
+ : "discarded");
+  dropTaskGroup(taskGroup);
+
+  // Shutdown the executor if all the active child containers have
+  // terminated.
+  if (containers.empty()) {
+_shutdown();
+  }
+
   return;
 }
 
 // It is possible that the agent process failed after the connection was
-// established. Shutdown the executor if this happens.
+// established. Drop the task group if this happens.
 if (state == DISCONNECTED || state == CONNECTED) {
-  LOG(ERROR) << "Unable to complete the launch group operation "
- << "as the executor is in state " << state;
-  _shutdown();
+  LOG(WARNING) << "Unable to complete the launch group operation "
+   << "as the executor is in state " << state;
+  dropTaskGroup(taskGroup);
+
+  // Shutdown the executor if all the active child containers have
+  // terminated.
+  if (containers.empty()) {
+_shutdown();
+  }
   return;
 }
 
@@ -1515,6 +1529,19 @@ private:
 taskId);
   }
 
+  void dropTaskGroup(const TaskGroupInfo& taskGroup)
+  {
+TaskState taskState =
+  protobuf::frameworkHasCapability(
+  frameworkInfo.get(), FrameworkInfo::Capability::PARTITION_AWARE)
+? TASK_DROPPED
+: TASK_LOST;
+
+foreach (const TaskInfo& task, taskGroup.tasks()) {
+  forward(createTaskStatus(task.task_id(), taskState));
+}
+  }
+
   enum State
   {
 CONNECTED,



[6/7] mesos git commit: Removed outdated executor-wide launched flag from the default executor.

2018-02-14 Thread qianzhang
Removed outdated executor-wide launched flag from the default executor.

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


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

Branch: refs/heads/master
Commit: 632ff7f7f8e32d3f9507e9199c8a253ff755224e
Parents: 54b6c5b
Author: Gaston Kleiman 
Authored: Wed Feb 14 14:35:34 2018 +0800
Committer: Qian Zhang 
Committed: Wed Feb 14 20:37:31 2018 +0800

--
 src/launcher/default_executor.cpp | 13 -
 1 file changed, 4 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/632ff7f7/src/launcher/default_executor.cpp
--
diff --git a/src/launcher/default_executor.cpp 
b/src/launcher/default_executor.cpp
index ff437bc..8720dad 100644
--- a/src/launcher/default_executor.cpp
+++ b/src/launcher/default_executor.cpp
@@ -114,7 +114,7 @@ private:
 // TODO(bennoe): Create a real state machine instead of adding
 // more and more ad-hoc boolean values.
 
-// Indicates whether a container has been launched.
+// Indicates whether the child container has been launched.
 bool launched;
 
 // Indicates whether a status update acknowledgement
@@ -139,7 +139,6 @@ public:
 : ProcessBase(process::ID::generate("default-executor")),
   state(DISCONNECTED),
   contentType(ContentType::PROTOBUF),
-  launched(false),
   shuttingDown(false),
   unhealthy(false),
   frameworkInfo(None()),
@@ -207,7 +206,7 @@ public:
 // It is possible that the agent process had failed after we
 // had launched the child containers. We can resume waiting on the
 // child containers again.
-if (launched) {
+if (!containers.empty()) {
   wait(containers.keys());
 }
 
@@ -349,8 +348,6 @@ protected:
   {
 CHECK_EQ(SUBSCRIBED, state);
 
-launched = true;
-
 process::http::connect(agent)
   .onAny(defer(self(), ::_launchGroup, taskGroup, lambda::_1));
   }
@@ -540,7 +537,6 @@ protected:
   return;
 }
 
-CHECK(launched);
 CHECK_EQ(containerIds.size(), (size_t) taskGroup.tasks().size());
 CHECK_EQ(containerIds.size(), responses->size());
 
@@ -666,7 +662,7 @@ protected:
   void wait(const list& taskIds)
   {
 CHECK_EQ(SUBSCRIBED, state);
-CHECK(launched);
+CHECK(!containers.empty());
 CHECK_SOME(connectionId);
 
 LOG(INFO) << "Waiting on child containers of tasks " << stringify(taskIds);
@@ -1014,7 +1010,7 @@ protected:
 
 shuttingDown = true;
 
-if (!launched) {
+if (containers.empty()) {
   _shutdown();
   return;
 }
@@ -1550,7 +1546,6 @@ private:
   } state;
 
   const ContentType contentType;
-  bool launched;
   bool shuttingDown;
   bool unhealthy; // Set to true if any of the tasks are reported unhealthy.
   Option frameworkInfo;



[1/5] mesos git commit: Added new protobuf field `launch_executor` in RunTask(Group)Message.

2018-02-14 Thread grag
Repository: mesos
Updated Branches:
  refs/heads/1.5.x 13deae3ec -> ee0fb5908


Added new protobuf field `launch_executor` in RunTask(Group)Message.

This boolean flag is used for the master to specify whether a
new executor should be launched for the task or task group (with
the exception of the command executor). This allows the master
to control executor creation on the agent.

Also updated the relevant message handlers and mock functions.

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


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

Branch: refs/heads/1.5.x
Commit: 08e0ceb84e4bf353e1f938482bb6766bf73310c7
Parents: 13deae3
Author: Meng Zhu 
Authored: Tue Feb 13 22:44:48 2018 -0800
Committer: Greg Mann 
Committed: Wed Feb 14 03:41:15 2018 -0800

--
 src/messages/messages.proto | 22 ++
 src/slave/slave.cpp | 50 +---
 src/slave/slave.hpp | 18 +--
 src/tests/mock_slave.cpp| 16 -
 src/tests/mock_slave.hpp| 16 -
 src/tests/slave_tests.cpp   |  6 ++---
 6 files changed, 93 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/08e0ceb8/src/messages/messages.proto
--
diff --git a/src/messages/messages.proto b/src/messages/messages.proto
index 0db44a2..556801d 100644
--- a/src/messages/messages.proto
+++ b/src/messages/messages.proto
@@ -293,8 +293,6 @@ message ReviveOffersMessage {
 
 
 /**
- * Depending on the `TaskInfo`, this message either notifies an existing
- * executor to run the task, or starts a new executor and runs the task.
  * This message is sent when scheduler::Call::Accept is sent with
  * Offer::Operation::Launch.
  *
@@ -326,13 +324,19 @@ message RunTaskMessage {
   // forward executor messages through the master. For schedulers
   // still using the driver, this will remain set.
   optional string pid = 3;
+
+  // If this field is absent (as prior to 1.5), depending on the `TaskInfo`,
+  // this message either notifies an existing executor to run the task, or
+  // starts a new executor and runs the task.
+  //
+  // Starting 1.5, this field will always be set. Agent should only launch
+  // an executor if this field value is true.
+  optional bool launch_executor = 6;
 }
 
 
 /**
- * This message either notifies an existing executor to run a task
- * group, or starts a new executor and runs the task group. This
- * message is sent when scheduler::Call::Accept is sent with
+ * This message is sent when scheduler::Call::Accept is sent with
  * Offer::Operation::LaunchGroup.
  *
  * See executor::Event::LaunchGroup.
@@ -354,6 +358,14 @@ message RunTaskGroupMessage {
   // because this means the operation is operating on resources that
   // might have already been invalidated.
   repeated ResourceVersionUUID resource_version_uuids = 4;
+
+  // If this field is absent (as prior to 1.5), depending on the `TaskInfo`,
+  // this message either notifies an existing executor to run the task, or
+  // starts a new executor and runs the task.
+  //
+  // Starting 1.5, this field will always be set. Agent should only launch
+  // an executor if this field value is true.
+  optional bool launch_executor = 5;
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/08e0ceb8/src/slave/slave.cpp
--
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 151c5eb..4470b09 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -672,19 +672,10 @@ void Slave::initialize()
   ::connection);
 
   install(
-  ::runTask,
-  ::framework,
-  ::framework_id,
-  ::pid,
-  ::task,
-  ::resource_version_uuids);
+  ::handleRunTaskMessage);
 
   install(
-  ::runTaskGroup,
-  ::framework,
-  ::executor,
-  ::task_group,
-  ::resource_version_uuids);
+  ::handleRunTaskGroupMessage);
 
   install(
   ::killTask);
@@ -1898,6 +1889,22 @@ void Slave::doReliableRegistration(Duration maxBackoff)
 }
 
 
+void Slave::handleRunTaskMessage(
+const UPID& from,
+RunTaskMessage&& runTaskMessage)
+{
+  runTask(
+  from,
+  runTaskMessage.framework(),
+  runTaskMessage.framework_id(),
+  runTaskMessage.pid(),
+  runTaskMessage.task(),
+  google::protobuf::convert(runTaskMessage.resource_version_uuids()),
+  runTaskMessage.has_launch_executor() ?
+  Option(runTaskMessage.launch_executor()) : None());
+}
+
+
 // TODO(vinod): Instead of crashing the slave on checkpoint 

[5/5] mesos git commit: Made master set `launch_executor` in the RunTask(Group)Message.

2018-02-14 Thread grag
Made master set `launch_executor` in the RunTask(Group)Message.

By setting a new field `launch_executor` in the RunTask(Group)Message,
the master is able to control executor creation on the agent.

Also refactored the `addTask()` logic. Added two new functions:
`isTaskLaunchExecutor()` checks if a task needs to launch an executor;
`addExecutor()` adds an executor to the framework and slave.

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


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

Branch: refs/heads/1.5.x
Commit: 10aa875df8947f8cbfb318820101984d99259070
Parents: 08e0ceb
Author: Meng Zhu 
Authored: Tue Feb 13 22:44:58 2018 -0800
Committer: Greg Mann 
Committed: Wed Feb 14 03:41:16 2018 -0800

--
 src/master/master.cpp | 112 +++--
 src/master/master.hpp |  19 ++--
 2 files changed, 92 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/10aa875d/src/master/master.cpp
--
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 2758000..2b093d6 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -3883,44 +3883,56 @@ Future Master::authorizeSlave(const 
Option& principal)
 }
 
 
-Resources Master::addTask(
-const TaskInfo& task,
+bool Master::isLaunchExecutor(
+const ExecutorID& executorId,
 Framework* framework,
-Slave* slave)
+Slave* slave) const
 {
   CHECK_NOTNULL(framework);
   CHECK_NOTNULL(slave);
-  CHECK(slave->connected) << "Adding task " << task.task_id()
-  << " to disconnected agent " << *slave;
 
-  // The resources consumed.
-  Resources resources = task.resources();
+  if (!slave->hasExecutor(framework->id(), executorId)) {
+CHECK(!framework->hasExecutor(slave->id, executorId))
+  << "Executor '" << executorId
+  << "' known to the framework " << *framework
+  << " but unknown to the agent " << *slave;
+return true;
+  }
+
+  return false;
+}
+
 
-  // Determine if this task launches an executor, and if so make sure
-  // the slave and framework state has been updated accordingly.
+void Master::addExecutor(
+const ExecutorInfo& executorInfo,
+Framework* framework,
+Slave* slave)
+{
+  CHECK_NOTNULL(framework);
+  CHECK_NOTNULL(slave);
+  CHECK(slave->connected) << "Adding executor " << executorInfo.executor_id()
+  << " to disconnected agent " << *slave;
 
-  if (task.has_executor()) {
-// TODO(benh): Refactor this code into Slave::addTask.
-if (!slave->hasExecutor(framework->id(), task.executor().executor_id())) {
-  CHECK(!framework->hasExecutor(slave->id, task.executor().executor_id()))
-<< "Executor '" << task.executor().executor_id()
-<< "' known to the framework " << *framework
-<< " but unknown to the agent " << *slave;
+  slave->addExecutor(framework->id(), executorInfo);
+  framework->addExecutor(slave->id, executorInfo);
+}
 
-  slave->addExecutor(framework->id(), task.executor());
-  framework->addExecutor(slave->id, task.executor());
 
-  resources += task.executor().resources();
-}
-  }
+void Master::addTask(
+const TaskInfo& task,
+Framework* framework,
+Slave* slave)
+{
+  CHECK_NOTNULL(framework);
+  CHECK_NOTNULL(slave);
+  CHECK(slave->connected) << "Adding task " << task.task_id()
+  << " to disconnected agent " << *slave;
 
   // Add the task to the framework and slave.
   Task* t = new Task(protobuf::createTask(task, TASK_STAGING, 
framework->id()));
 
   slave->addTask(t);
   framework->addTask(t);
-
-  return resources;
 }
 
 
@@ -4953,7 +4965,23 @@ void Master::_accept(
 
   // Add task.
   if (pending) {
-const Resources consumed = addTask(task, framework, slave);
+Resources consumed;
+
+bool launchExecutor = true;
+if (task.has_executor()) {
+  launchExecutor = isLaunchExecutor(
+  task.executor().executor_id(), framework, slave);
+
+  // Master tracks the new executor only if the task is not a
+  // command task.
+  if (launchExecutor) {
+addExecutor(task.executor(), framework, slave);
+consumed += task.executor().resources();
+  }
+}
+
+addTask(task, framework, slave);
+consumed += task.resources();
 
 CHECK(available.contains(consumed))
   << available << " does not contain " << consumed;
@@ -4995,6 

[3/5] mesos git commit: Fixed a bug where executor info lingers on master if failed to launch.

2018-02-14 Thread grag
Fixed a bug where executor info lingers on master if failed to launch.

Master relies on `ExitedExecutorMessage` from the agent to remove
executor entries. However, this message won't be sent if an executor
never actually launched (due to transient error), leaving executor
info on the master and the executor's resources claimed.
See MESOS-1720.

This patch fixes this issue by sending the `ExitedExecutorMessage`
from the agent if the executor is never launched.

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


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

Branch: refs/heads/1.5.x
Commit: 2bdf4935b7929d0dce614d76461cddb991df89da
Parents: fb0e2f1
Author: Meng Zhu 
Authored: Tue Feb 13 22:45:07 2018 -0800
Committer: Greg Mann 
Committed: Wed Feb 14 03:41:16 2018 -0800

--
 src/slave/slave.cpp   | 276 +
 src/slave/slave.hpp   |  10 +-
 src/tests/mock_slave.cpp  |   8 +-
 src/tests/mock_slave.hpp  |   8 +-
 src/tests/slave_tests.cpp |  35 --
 5 files changed, 292 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/2bdf4935/src/slave/slave.cpp
--
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 4e2b33a..c0501f8 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -1935,7 +1935,13 @@ void Slave::runTask(
 
   const ExecutorInfo executorInfo = getExecutorInfo(frameworkInfo, task);
 
-  run(frameworkInfo, executorInfo, task, None(), resourceVersionUuids, pid);
+  run(frameworkInfo,
+  executorInfo,
+  task,
+  None(),
+  resourceVersionUuids,
+  pid,
+  launchExecutor);
 }
 
 
@@ -1945,7 +1951,8 @@ void Slave::run(
 Option task,
 Option taskGroup,
 const vector& resourceVersionUuids,
-const UPID& pid)
+const UPID& pid,
+const Option& launchExecutor)
 {
   CHECK_NE(task.isSome(), taskGroup.isSome())
 << "Either task or task group should be set but not both";
@@ -2030,6 +2037,10 @@ void Slave::run(
 LOG(WARNING) << "Ignoring running " << taskOrTaskGroup(task, taskGroup)
  << " because the agent is " << state;
 
+// We do not send `ExitedExecutorMessage` here because the disconnected
+// agent is expected to (eventually) reregister and reconcile the executor
+// states with the master.
+
 // TODO(vinod): Consider sending a TASK_LOST here.
 // Currently it is tricky because 'statusUpdate()'
 // ignores updates for unknown frameworks.
@@ -2150,7 +2161,8 @@ void Slave::run(
  executorInfo,
  task,
  taskGroup,
- resourceVersionUuids));
+ resourceVersionUuids,
+ launchExecutor));
 }
 
 
@@ -2160,7 +2172,8 @@ void Slave::_run(
 const ExecutorInfo& executorInfo,
 const Option& task,
 const Option& taskGroup,
-const std::vector& resourceVersionUuids)
+const std::vector& resourceVersionUuids,
+const Option& launchExecutor)
 {
   // TODO(anindya_sinha): Consider refactoring the initial steps common
   // to `_run()` and `__run()`.
@@ -2182,6 +2195,14 @@ void Slave::_run(
 LOG(WARNING) << "Ignoring running " << taskOrTaskGroup(task, taskGroup)
  << " because the framework " << frameworkId
  << " does not exist";
+
+if (launchExecutor.isSome() && launchExecutor.get()) {
+  // Master expects new executor to be launched for this task(s) launch.
+  // To keep the master executor entries updated, the agent needs to send
+  // 'ExitedExecutorMessage' even though no executor launched.
+  sendExitedExecutorMessage(frameworkId, executorInfo.executor_id());
+}
+
 return;
   }
 
@@ -2202,6 +2223,13 @@ void Slave::_run(
   removeFramework(framework);
 }
 
+if (launchExecutor.isSome() && launchExecutor.get()) {
+  // Master expects new executor to be launched for this task(s) launch.
+  // To keep the master executor entries updated, the agent needs to send
+  // 'ExitedExecutorMessage' even though no executor launched.
+  sendExitedExecutorMessage(frameworkId, executorInfo.executor_id());
+}
+
 return;
   }
 
@@ -2226,6 +2254,14 @@ void Slave::_run(
 LOG(WARNING) << "Ignoring running " << taskOrTaskGroup(task, taskGroup)
  << " of framework " << frameworkId
  << " because it has been killed in the meantime";
+
+if (launchExecutor.isSome() && launchExecutor.get()) {
+  // Master expects new executor to be launched for this task(s) 

[2/5] mesos git commit: Added helper function for the agent to send `ExitedExecutorMessage`.

2018-02-14 Thread grag
Added helper function for the agent to send `ExitedExecutorMessage`.

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


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

Branch: refs/heads/1.5.x
Commit: fb0e2f1f81b2256a76cae83893e2a69fdd91fcd7
Parents: 10aa875
Author: Meng Zhu 
Authored: Tue Feb 13 22:45:03 2018 -0800
Committer: Greg Mann 
Committed: Wed Feb 14 03:41:16 2018 -0800

--
 src/slave/slave.cpp | 25 ++---
 src/slave/slave.hpp |  5 +
 2 files changed, 23 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/fb0e2f1f/src/slave/slave.cpp
--
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 4470b09..4e2b33a 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -6070,13 +6070,7 @@ void Slave::executorTerminated(
   // are generated by the slave.
   // TODO(vinod): Reliably forward this message to the master.
   if (!executor->isGeneratedForCommandTask()) {
-ExitedExecutorMessage message;
-message.mutable_slave_id()->MergeFrom(info.id());
-message.mutable_framework_id()->MergeFrom(frameworkId);
-message.mutable_executor_id()->MergeFrom(executorId);
-message.set_status(status);
-
-if (master.isSome()) { send(master.get(), message); }
+sendExitedExecutorMessage(frameworkId, executorId, status);
   }
 
   // Remove the executor if either the slave or framework is
@@ -8280,6 +8274,23 @@ void Slave::sendExecutorTerminatedStatusUpdate(
 }
 
 
+void Slave::sendExitedExecutorMessage(
+const FrameworkID& frameworkId,
+const ExecutorID& executorId,
+const Option& status)
+{
+  ExitedExecutorMessage message;
+  message.mutable_slave_id()->MergeFrom(info.id());
+  message.mutable_framework_id()->MergeFrom(frameworkId);
+  message.mutable_executor_id()->MergeFrom(executorId);
+  message.set_status(status.getOrElse(-1));
+
+  if (master.isSome()) {
+send(master.get(), message);
+  }
+}
+
+
 // TODO(dhamon): Move these to their own metrics.hpp|cpp.
 double Slave::_tasks_staging()
 {

http://git-wip-us.apache.org/repos/asf/mesos/blob/fb0e2f1f/src/slave/slave.hpp
--
diff --git a/src/slave/slave.hpp b/src/slave/slave.hpp
index a4f031c..efe4a54 100644
--- a/src/slave/slave.hpp
+++ b/src/slave/slave.hpp
@@ -611,6 +611,11 @@ private:
   const FrameworkID& frameworkId,
   const Executor* executor);
 
+  void sendExitedExecutorMessage(
+  const FrameworkID& frameworkId,
+  const ExecutorID& executorId,
+  const Option& status = None());
+
   // Forwards the current total of oversubscribed resources.
   void forwardOversubscribed();
   void _forwardOversubscribed(



[4/5] mesos git commit: Added MESOS-1720 to the 1.5.1 CHANGELOG.

2018-02-14 Thread grag
Added MESOS-1720 to the 1.5.1 CHANGELOG.


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

Branch: refs/heads/1.5.x
Commit: ee0fb5908a8c8721212234ec81ea1fc67ee34cc5
Parents: 2bdf493
Author: Greg Mann 
Authored: Wed Feb 14 02:40:32 2018 -0800
Committer: Greg Mann 
Committed: Wed Feb 14 03:41:16 2018 -0800

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/ee0fb590/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index adf0200..408eff8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -10,6 +10,7 @@ Release Notes - Mesos - Version 1.5.1 (WIP)
  * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
  * [MESOS-8565] - Persistent volumes are not visible in Mesos UI when 
launching a pod using default executor.
  * [MESOS-8577] - Destroy nested container if 
`LAUNCH_NESTED_CONTAINER_SESSION` fails.
+ * [MESOS-1720] - Slave should send exited executor message when the executor 
is never launched.
 
 
 Release Notes - Mesos - Version 1.5.0



[07/14] mesos-site git commit: Updated the website built from mesos SHA: 103d6e0.

2018-02-14 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/functions_func_0x68.html
--
diff --git a/content/api/latest/c++/functions_func_0x68.html 
b/content/api/latest/c++/functions_func_0x68.html
index 7ea27f3..2c1cb69 100644
--- a/content/api/latest/c++/functions_func_0x68.html
+++ b/content/api/latest/c++/functions_func_0x68.html
@@ -97,12 +97,18 @@
 Handle()
 : routing::Handle
 
+handleRunTaskGroupMessage()
+: mesos::internal::slave::Slave
+
+handleRunTaskMessage()
+: mesos::internal::slave::Slave
+
 hasDiscard()
 : process::Future
 T 
 
 hasExecutor()
-: mesos::internal::master::Framework
-, mesos::internal::master::Slave
+: mesos::internal::master::Slave
+, mesos::internal::master::Framework
 
 hash()
 : routing::filter::U32Handle
@@ -111,7 +117,7 @@
 : hashmap Key, 
Value, Hash, Equal 
 
 hashset()
-: hashset Elem, 
Hash, Equal 
+: hashset Elem, 
Hash, Equal 
 
 hasOption()
 : mesos::internal::fs::MountTable::Entry
@@ -146,8 +152,8 @@
 : process::Help
 
 HierarchicalAllocatorProcess()
-: mesos::internal::master::allocator::internal::HierarchicalAllocatorProcess
-, mesos::internal::master::allocator::HierarchicalAllocatorProcess
 RoleSorter, FrameworkSorter, QuotaRoleSorter 
+: mesos::internal::master::allocator::HierarchicalAllocatorProcess
 RoleSorter, FrameworkSorter, QuotaRoleSorter 
+, mesos::internal::master::allocator::internal::HierarchicalAllocatorProcess
 
 hooksAvailable()
 : mesos::internal::HookManager
@@ -159,7 +165,7 @@
 : process::network::inet::Address
 
 Hours()
-: Hours
+: Hours
 
 hrs()
 : Duration

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/functions_func_0x69.html
--
diff --git a/content/api/latest/c++/functions_func_0x69.html 
b/content/api/latest/c++/functions_func_0x69.html
index 6266cc9..be5642f 100644
--- a/content/api/latest/c++/functions_func_0x69.html
+++ b/content/api/latest/c++/functions_func_0x69.html
@@ -244,7 +244,7 @@
 : mesos::internal::master::Master
 
 invoke()
-: Jvm
+: Jvm
 
 invokeStatic()
 : Jvm
@@ -259,9 +259,9 @@
 : net::IPv6
 
 is()
-: JSON::Value
-, process::Event
+: process::Event
 , process::StateMachine
 State 
+, JSON::Value
 
 isAbandoned()
 : process::Future
 T 
@@ -313,6 +313,9 @@
 isGeneratedForCommandTask()
 : mesos::internal::slave::Executor
 
+isLaunchExecutor()
+: mesos::internal::master::Master
+
 isLeaf()
 : mesos::internal::master::allocator::DRFSorter::Node
 
@@ -330,23 +333,23 @@
 , Result T 
 
 isolate()
-: mesos::internal::slave::MesosIsolatorProcess
-, mesos::slave::Isolator
+: mesos::slave::Isolator
 , mesos::internal::slave::MesosIsolator
-, mesos::internal::slave::NetworkCniIsolatorProcess
-, mesos::internal::slave::XfsDiskIsolatorProcess
-, mesos::internal::slave::PortMappingIsolatorProcess
-, mesos::internal::slave::PosixIsolatorProcess
 , mesos::internal::slave::NetClsSubsystem
-, mesos::internal::slave::CgroupsIsolatorProcess
 , mesos::internal::slave::PosixDiskIsolatorProcess
+, mesos::internal::slave::XfsDiskIsolatorProcess
 , mesos::internal::slave::WindowsCpuIsolatorProcess
 , mesos::internal::slave::Subsystem
+, mesos::internal::slave::PortMappingIsolatorProcess
+, mesos::internal::slave::PosixIsolatorProcess
+, mesos::internal::slave::NetworkCniIsolatorProcess
+, mesos::internal::slave::CgroupsIsolatorProcess
 , mesos::internal::slave::WindowsMemIsolatorProcess
+, mesos::internal::slave::MesosIsolatorProcess
 
 isPending()
-: mesos::internal::slave::Framework
-, process::Future
 T 
+: process::Future
 T 
+, mesos::internal::slave::Framework
 
 isPersistentVolume()
 : mesos::Resources
@@ -371,23 +374,23 @@
 , mesos::v1::Resources
 
 isSome()
-: Result T 
+: Try 
T, E 
+, Result T 
 , Option T 
-, Try 
T, E 
 
 isTrackedUnderRole()
 : mesos::internal::master::Framework
 
 isUnreserved()
-: mesos::Resources
-, mesos::v1::Resources
+: mesos::v1::Resources
+, mesos::Resources
 
 isUsed()
 : mesos::internal::slave::NetClsHandleManager
 
 isValid()
-: mesos::v1::Attributes
-, mesos::Attributes
+: mesos::Attributes
+, mesos::v1::Attributes
 
 isWhitelisted()
 : mesos::internal::master::allocator::internal::HierarchicalAllocatorProcess

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/functions_func_0x6d.html
--
diff --git a/content/api/latest/c++/functions_func_0x6d.html 
b/content/api/latest/c++/functions_func_0x6d.html
index 32bc440..7375c2d 100644
--- a/content/api/latest/c++/functions_func_0x6d.html
+++ b/content/api/latest/c++/functions_func_0x6d.html
@@ -300,49 +300,47 @@
 , mesos::internal::tests::MockAuthorizer
 , mesos::internal::tests::MockDockerContainerizer
 , mesos::internal::tests::MockSlave
-, mesos::internal::tests::MockExecutor
+, mesos::internal::tests::MockExecutor
 , 

[01/14] mesos-site git commit: Updated the website built from mesos SHA: 103d6e0.

2018-02-14 Thread git-site-role
Repository: mesos-site
Updated Branches:
  refs/heads/asf-site b41fc7fa1 -> 8b64bd2fc


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/blog/feed.xml
--
diff --git a/content/blog/feed.xml b/content/blog/feed.xml
index ae45149..9842b87 100644
--- a/content/blog/feed.xml
+++ b/content/blog/feed.xml
@@ -295,7 +295,7 @@ To learn more about CSI work in Mesos, you can dig into the 
design document 
 /ul
 
 
-pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#x6d;#97;#105;#x6c;#x74;#x6f;#58;#x64;#x65;#118;#x40;#97;#x70;#x61;#x63;#x68;#x65;#x2e;#x6d;#x65;#x73;#111;#115;#x2e;#x6f;#x72;#x67;#100;#101;#118;#x40;#x61;#x70;#x61;#99;#104;#101;#46;#x6d;#x65;#x73;#111;#x73;#46;#111;#x72;#x67;/a./p
+pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#x6d;#97;#105;#108;#116;#x6f;#x3a;#x64;#x65;#118;#x40;#97;#x70;#97;#x63;#104;#x65;#46;#109;#101;#x73;#111;#115;#x2e;#111;#x72;#103;#100;#101;#118;#x40;#97;#112;#x61;#99;#x68;#101;#x2e;#109;#101;#x73;#111;#115;#46;#111;#x72;#103;/a./p
 

   

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/blog/performance-working-group-progress-report/index.html
--
diff --git a/content/blog/performance-working-group-progress-report/index.html 
b/content/blog/performance-working-group-progress-report/index.html
index a6b608d..18f59de 100644
--- a/content/blog/performance-working-group-progress-report/index.html
+++ b/content/blog/performance-working-group-progress-report/index.html
@@ -248,7 +248,7 @@
 
 
 
-If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
+If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
 
   
 



[11/14] mesos-site git commit: Updated the website built from mesos SHA: 103d6e0.

2018-02-14 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/classmesos_1_1internal_1_1tests_1_1MockSlave-members.html
--
diff --git 
a/content/api/latest/c++/classmesos_1_1internal_1_1tests_1_1MockSlave-members.html
 
b/content/api/latest/c++/classmesos_1_1internal_1_1tests_1_1MockSlave-members.html
index 2b378eb..9a49827 100644
--- 
a/content/api/latest/c++/classmesos_1_1internal_1_1tests_1_1MockSlave-members.html
+++ 
b/content/api/latest/c++/classmesos_1_1internal_1_1tests_1_1MockSlave-members.html
@@ -60,7 +60,7 @@
   ___run(const
 process::Future Nothing  future, const FrameworkID 
frameworkId, const ExecutorID executorId, const ContainerID 
containerId, const std::list TaskInfo  tasks, const 
std::list TaskGroupInfo  taskGroups)mesos::internal::slave::Slavevirtual
   ___statusUpdate(const
 process::Future Nothing  future, const StatusUpdate update, 
const Option process::UPID  pid)mesos::internal::slave::Slave
   __recover(const
 process::Future Nothing  future)mesos::internal::slave::Slavevirtual
-  __run(const
 process::Future std::list bool  future, const 
FrameworkInfo frameworkInfo, const ExecutorInfo executorInfo, const 
Option TaskInfo  task, const Option TaskGroupInfo  
taskGroup, const std::vector ResourceVersionUUID  
resourceVersionUuids)mesos::internal::slave::Slave
+  __run(const
 process::Future std::list bool  future, const 
FrameworkInfo frameworkInfo, const ExecutorInfo executorInfo, const 
Option TaskInfo  task, const Option TaskGroupInfo  
taskGroup, const std::vector ResourceVersionUUID  
resourceVersionUuids, const Option bool  
launchExecutor)mesos::internal::slave::Slavevirtual
   __statusUpdate(const
 Option process::Future Nothing  future, const 
StatusUpdate update, const Option process::UPID  pid, const 
ExecutorID executorId, const ContainerID containerId, bool 
checkpoint)mesos::internal::slave::Slave
   _checkDiskUsage(const
 process::Future double  usage)mesos::internal::slave::Slave
   _checkImageDiskUsage(const
 process::Future double  usage)mesos::internal::slave::Slave
@@ -68,7 +68,7 @@
   _recover()mesos::internal::slave::Slave
   _recoverContainerizer(const
 Option state::SlaveState  state)mesos::internal::slave::Slave
   _reregisterExecutor(const
 process::Future Nothing  future, const FrameworkID 
frameworkId, const ExecutorID executorId, const ContainerID 
containerId)mesos::internal::slave::Slave
-  _run(const
 process::Future std::list bool  unschedules, const 
FrameworkInfo frameworkInfo, const ExecutorInfo executorInfo, const 
Option TaskInfo  task, const Option TaskGroupInfo  
taskGroup, const std::vector ResourceVersionUUID  
resourceVersionUuids)mesos::internal::slave::Slavevirtual
+  _run(const
 process::Future std::list bool  unschedules, const 
FrameworkInfo frameworkInfo, const ExecutorInfo executorInfo, const 
Option TaskInfo  task, const Option TaskGroupInfo  
taskGroup, const std::vector ResourceVersionUUID  
resourceVersionUuids, const Option bool  
launchExecutor)mesos::internal::slave::Slavevirtual
   _shutdownExecutor(Framework
 *framework, Executor *executor)mesos::internal::slave::Slavevirtual
   _statusUpdate(StatusUpdate
 update, const Option process::UPID  pid, const ExecutorID 
executorId, const Option process::Future ContainerStatus  
containerStatus)mesos::internal::slave::Slave
   _statusUpdateAcknowledgement(const
 process::Future bool  future, const TaskID taskId, const 
FrameworkID frameworkId, const id::UUID uuid)mesos::internal::slave::Slave
@@ -106,6 +106,8 @@
   getExecutor(const
 ContainerID containerId) const mesos::internal::slave::Slave
   getExecutorInfo(const
 FrameworkInfo frameworkInfo, const TaskInfo task) const mesos::internal::slave::Slave
   getFramework(const
 FrameworkID frameworkId) const mesos::internal::slave::Slave
+  handleRunTaskGroupMessage(const
 process::UPID from, RunTaskGroupMessage 
runTaskGroupMessage)mesos::internal::slave::Slave
+  handleRunTaskMessage(const
 process::UPID from, RunTaskMessage runTaskMessage)mesos::internal::slave::Slave
   HttpRequestHandler
 typedefprocess::ProcessBaseprotected
   httpSequenceprocess::ProcessBase
   initialize()mesos::internal::slave::Slavevirtual
@@ -135,71 +137,73 @@
   MOCK_METHOD2(_shutdownExecutor,
 void(slave::Framework *framework, slave::Executor *executor))mesos::internal::tests::MockSlave
   MOCK_METHOD3(executorTerminated,
 void(const FrameworkID frameworkId, const ExecutorID executorId, 
const process::Future Option mesos::slave::ContainerTermination 
 termination))mesos::internal::tests::MockSlave
   MOCK_METHOD3(shutdownExecutor,
 void(const process::UPID from, const FrameworkID frameworkId, const 
ExecutorID executorId))mesos::internal::tests::MockSlave
-  MOCK_METHOD5(runTaskGroup,
 void(const process::UPID from, const FrameworkInfo frameworkInfo, 
const ExecutorInfo executorInfo, const TaskGroupInfo taskGroup, const 
std::vector ResourceVersionUUID  

[13/14] mesos-site git commit: Updated the website built from mesos SHA: 103d6e0.

2018-02-14 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/classmesos_1_1internal_1_1master_1_1Master-members.html
--
diff --git 
a/content/api/latest/c++/classmesos_1_1internal_1_1master_1_1Master-members.html
 
b/content/api/latest/c++/classmesos_1_1internal_1_1master_1_1Master-members.html
index 9e3c6a1..9d83c21 100644
--- 
a/content/api/latest/c++/classmesos_1_1internal_1_1master_1_1Master-members.html
+++ 
b/content/api/latest/c++/classmesos_1_1internal_1_1master_1_1Master-members.html
@@ -74,70 +74,72 @@
   _removeSlave(Slave
 *slave, const process::Future bool  registrarResult, const 
std::string removalCause, Option process::metrics::Counter  
reason=None())mesos::internal::master::Masterprotected
   _reregisterSlave(const
 process::UPID pid, ReregisterSlaveMessage incomingMessage, 
const Option process::http::authentication::Principal  principal, 
const process::Future bool  authorized)mesos::internal::master::Masterprotected
   activateRecoveredFramework(Framework
 *framework, const FrameworkInfo frameworkInfo, const Option 
process::UPID  pid, const Option HttpConnection  http, 
const std::set std::string  suppressedRoles)mesos::internal::master::Masterprotected
-  addFramework(Framework
 *framework, const std::set std::string  suppressedRoles)mesos::internal::master::Masterprotected
-  addOperation(Framework
 *framework, Slave *slave, Operation *operation)mesos::internal::master::Masterprotected
-  addSlave(Slave
 *slave, std::vector Archive::Framework  
completedFrameworks)mesos::internal::master::Masterprotected
-  addTask(const
 TaskInfo task, Framework *framework, Slave *slave)mesos::internal::master::Masterprotected
-  agentReregisterTimeout(const
 SlaveID slaveId)mesos::internal::master::Masterprotected
-  apply(Slave
 *slave, const Offer::Operation operation)mesos::internal::master::Masterprotected
-  authenticate(const
 process::UPID from, const process::UPID pid)mesos::internal::master::Master
-  AuthenticatedHttpRequestHandler
 typedefprocess::ProcessBaseprotected
-  authenticationTimeout(process::Future
 Option std::string  future)mesos::internal::master::Masterprotected
-  authorizeCreateVolume(const
 Offer::Operation::Create create, const Option 
process::http::authentication::Principal  principal)mesos::internal::master::Masterprotected
-  authorizeDestroyVolume(const
 Offer::Operation::Destroy destroy, const Option 
process::http::authentication::Principal  principal)mesos::internal::master::Masterprotected
-  authorizeFramework(const
 FrameworkInfo frameworkInfo)mesos::internal::master::Masterprotected
-  authorizeReserveResources(const
 Offer::Operation::Reserve reserve, const Option 
process::http::authentication::Principal  principal)mesos::internal::master::Masterprotected
-  authorizeReserveResources(const
 Resources resources, const Option 
process::http::authentication::Principal  principal)mesos::internal::master::Masterprotected
-  authorizeSlave(const
 SlaveInfo slaveInfo, const Option 
process::http::authentication::Principal  principal)mesos::internal::master::Masterprotected
-  authorizeTask(const
 TaskInfo task, Framework *framework)mesos::internal::master::Masterprotected
-  authorizeUnreserveResources(const
 Offer::Operation::Unreserve unreserve, const Option 
process::http::authentication::Principal  principal)mesos::internal::master::Masterprotected
-  consume(process::MessageEvent
 event) overridemesos::internal::master::Masterprotectedvirtual
-  consume(process::ExitedEvent
 event) overridemesos::internal::master::Masterprotectedvirtual
-  Process
 Master ::consume(DispatchEvent event) overrideprocess::ProcessBaseprotectedvirtual
-  Process
 Master ::consume(HttpEvent event) overrideprocess::ProcessBaseprotectedvirtual
-  Process
 Master ::consume(TerminateEvent event) overrideprocess::ProcessBaseprotectedvirtual
-  contended(const
 process::Future process::Future Nothing  
candidacy)mesos::internal::master::Masterprotected
-  deactivate(Framework
 *framework, bool rescind)mesos::internal::master::Masterprotected
-  deactivate(Slave
 *slave)mesos::internal::master::Masterprotected
-  deactivateFramework(const
 process::UPID from, const FrameworkID frameworkId)mesos::internal::master::Master
-  delegate(const
 std::string name, const UPID pid)process::ProcessBaseinlineprotected
-  detected(const
 process::Future Option MasterInfo  _leader)mesos::internal::master::Master
-  disconnect(Framework
 *framework)mesos::internal::master::Masterprotected
-  disconnect(Slave
 *slave)mesos::internal::master::Masterprotected
-  eventCount()process::ProcessBaseprotected
-  exceededCapacity(const
 process::MessageEvent event, const Option std::string  
principal, uint64_t capacity)mesos::internal::master::Masterprotected
-  executorMessage(const
 process::UPID from, const SlaveID slaveId, const FrameworkID 
frameworkId, const ExecutorID executorId, const std::string 

[03/14] mesos-site git commit: Updated the website built from mesos SHA: 103d6e0.

2018-02-14 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/slave_8hpp_source.html
--
diff --git a/content/api/latest/c++/slave_8hpp_source.html 
b/content/api/latest/c++/slave_8hpp_source.html
index 98c62e5..2dbb657 100644
--- a/content/api/latest/c++/slave_8hpp_source.html
+++ b/content/api/latest/c++/slave_8hpp_source.html
@@ -198,1048 +198,1071 @@
   
144
   145 
 void doReliableRegistration(Duration maxBackoff);
   
146
-  147 
 // Made virtual for Slave mocking.
-  148 
 virtual void runTask(
-  149 
 const process::UPID from,
-  150 
 const FrameworkInfo frameworkInfo,
-  151 
 const FrameworkID frameworkId,
-  152 
 const process::UPID pid,
-  153 
 const TaskInfo task,
-  154 
 const 
std::vectorResourceVersionUUID resourceVersionUuids);
-  
155
-  156 
 void run(
-  157 
 const FrameworkInfo frameworkInfo,
-  158 
 ExecutorInfo executorInfo,
-  159 
 OptionTaskInfo 
task,
-  160 
 OptionTaskGroupInfo 
taskGroup,
-  161 
 const 
std::vectorResourceVersionUUID resourceVersionUuids,
-  162 
 const process::UPID pid);
-  
163
-  164 
 // Made virtual for Slave mocking.
-  165 
 virtual void _run(
-  166 
 const process::Futurestd::listbool
 unschedules,
-  167 
 const FrameworkInfo frameworkInfo,
-  168 
 const ExecutorInfo executorInfo,
-  169 
 const OptionTaskInfo task,
-  170 
 const OptionTaskGroupInfo taskGroup,
-  171 
 const 
std::vectorResourceVersionUUID resourceVersionUuids);
-  
172
-  173 
 // This is called when the resource limits of the 
container have
-  174 
 // been updated for the given tasks and task groups. If 
the update is
-  175 
 // successful, we flush the given tasks to the executor 
by sending
-  176 
 // RunTaskMessages or `LAUNCH_GROUP` events.
-  177 
 //
-  178 
 // Made virtual for Slave mocking.
-  179 
 virtual void ___run(
-  180 
 const process::FutureNothing 
future,
-  181 
 const FrameworkID frameworkId,
-  182 
 const ExecutorID executorId,
-  183 
 const ContainerID containerId,
-  184 
 const std::listTaskInfo 
tasks,
-  185 
 const std::listTaskGroupInfo 
taskGroups);
-  
186
-  187 
 // Made virtual for Slave mocking.
-  188 
 virtual void runTaskGroup(
-  189 
 const process::UPID from,
-  190 
 const FrameworkInfo frameworkInfo,
-  191 
 const ExecutorInfo executorInfo,
-  192 
 const TaskGroupInfo taskGroupInfo,
-  193 
 const 
std::vectorResourceVersionUUID resourceVersionUuids);
-  
194
-  195 
 // Made virtual for Slave mocking.
-  196 
 virtual void killTask(
-  197 
 const process::UPID from,
-  198 
 const KillTaskMessage 
killTaskMessage);
-  
199
-  200 
 // Made virtual for Slave mocking.
-  201 
 virtual void shutdownExecutor(
-  202 
 const process::UPID from,
-  203 
 const FrameworkID frameworkId,
-  204 
 const ExecutorID executorId);
+  147 
 // TODO(mzhu): Combine this with `runTask() and 
replace all `runTask()
+  148 
 // mock with `run()` mock.
+  149 
 void handleRunTaskMessage(
+  150 
 const process::UPID from,
+  151 
 RunTaskMessage runTaskMessage);
+  
152
+  153 
 // Made virtual for Slave mocking.
+  154 
 virtual void runTask(
+  155 
 const process::UPID from,
+  156 
 const FrameworkInfo frameworkInfo,
+  157 
 const FrameworkID frameworkId,
+  158 
 const process::UPID pid,
+  159 
 const TaskInfo task,
+  160 
 const 
std::vectorResourceVersionUUID resourceVersionUuids,
+  161 
 const Optionbool launchExecutor);
+  
162
+  163 
 void run(
+  164 
 const FrameworkInfo frameworkInfo,
+  165 
 ExecutorInfo executorInfo,
+  166 
 OptionTaskInfo 
task,
+  167 
 OptionTaskGroupInfo 
taskGroup,
+  168 
 const 
std::vectorResourceVersionUUID resourceVersionUuids,
+  169 
 const process::UPID pid,
+  170 
 const Optionbool launchExecutor);
+  
171
+  172 
 // Made virtual for Slave mocking.
+  173 
 virtual void _run(
+  174 
 const process::Futurestd::listbool
 unschedules,
+  175 
 const FrameworkInfo frameworkInfo,
+  176 
 const ExecutorInfo executorInfo,
+  177 
 const OptionTaskInfo task,
+  178 
 const OptionTaskGroupInfo taskGroup,
+  179 
 const 
std::vectorResourceVersionUUID resourceVersionUuids,
+  180 
 const Optionbool launchExecutor);
+  
181
+  182 
 // Made virtual for Slave mocking.
+  183 
 virtual void __run(
+  184 
 const process::Futurestd::listbool
 future,
+  185 
 const FrameworkInfo frameworkInfo,
+  186 
 const ExecutorInfo executorInfo,
+  187 
 const OptionTaskInfo task,
+  188 
 const OptionTaskGroupInfo taskGroup,
+  189 
 const 
std::vectorResourceVersionUUID resourceVersionUuids,
+  190 
 const Optionbool launchExecutor);
+  
191
+  192 
 // This is called when the resource limits of the 
container have
+  193 
 // been updated for the given tasks and 

[05/14] mesos-site git commit: Updated the website built from mesos SHA: 103d6e0.

2018-02-14 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/index.hhk
--
diff --git a/content/api/latest/c++/index.hhk b/content/api/latest/c++/index.hhk
index b9c8111..bb20017 100644
--- a/content/api/latest/c++/index.hhk
+++ b/content/api/latest/c++/index.hhk
@@ -251,7 +251,7 @@
   
   
   
-  
+  
   
   
   
@@ -340,9 +340,9 @@
   
   
   
-  
+  
   
-
+
 
   
   
@@ -502,12 +502,12 @@
 
   
   
-  
-  
   
+
 
-
   
+  
+  
   
   
   
@@ -538,6 +538,7 @@
   
   
 
+
 
 
   
@@ -626,7 +627,7 @@
   
   
 
-
+
 
   
   
@@ -1518,10 +1519,10 @@
 
 
   
-  
   
   
   
+
 
 
   
@@ -6726,6 +6727,8 @@
 
   
   
+  
+  
   
   
   
@@ -7649,6 +7652,7 @@
   
   
   
+  
   
   
   
@@ -10436,8 +10440,8 @@
   
   
   
-
 
+
 
 
 
@@ -10582,10 +10586,11 @@
 
 
 
+
 
 
 
-
+
 
 
 
@@ -10621,6 +10626,7 @@
 
 
 
+
 
 
 
@@ -12519,7 +12525,7 @@
 
 
 
-
+
 
 
 
@@ -12527,7 +12533,7 @@
 
 
 
-
+
 
 
 
@@ -12558,6 +12564,8 @@
 
 
 
+
+
 
 
 
@@ -12580,10 +12588,10 @@
 
 
 
-
+
 
-
-
+
+
 
 
 
@@ -13315,19 +13323,20 @@
 
 
 
-
 
+
 
 
 
-
+
+
 
 
 
 
 
-
-
+
+
 
 
   
@@ -14651,8 +14660,8 @@
 
 
 
-
 
+
 
   
   
@@ -15228,7 +15237,6 @@
   
   
 
-
 
   
   
@@ -15236,6 +15244,7 @@
 
 
   
+  
   
   
   
@@ -15478,13 +15487,10 @@
 
 
 
-  
-  
-  
-  
 
-
   
+  
+  
   
   
 
@@ -15898,8 +15904,8 @@
   
   
   
-  
   
+  
   
   
   
@@ -17272,8 +17278,8 @@
 
   
   
-  
   
+  
   
   
 
@@ -18043,8 +18049,8 @@
 
 
 
-
 
+
   
   
   
@@ -18376,8 +18382,8 @@
   
 
 
-
 
+
 
 
 
@@ -18390,13 +18396,13 @@
   
   
   
-
 
+
 
 
 
-
 
+
 
 
 
@@ -18641,11 +18647,11 @@
   
 
 
-
 
+
 
-
 
+
   
   
   
@@ -18907,8 +18913,8 @@
   
   
 
-
 
+
 
   
   
@@ -19150,8 +19156,8 @@
   
 
 
-
 
+
   
   
   
@@ -19293,8 +19299,8 @@
   
   
   
-
 
+
 
 
   
@@ -19363,8 +19369,8 @@
   
   
   
-
 
+
 
 
   
@@ -19377,8 +19383,8 @@
   
   
   
-
 
+
 
 
   
@@ -19391,29 +19397,29 @@
   
   
   
-
 
+
 
 
   
   
   
-
 
+
 
 
   
   
   
-
 
+
 
 
   
   
   
-
 
+
 
 
   
@@ -19440,15 +19446,15 @@
   
   
   
-
 
+
 
 
   
   
   
-
 
+
 
 
   
@@ -19468,22 +19474,22 @@
   
   
   
-
 
+
 
 
   
   
   
-
 
+
 
 
   
   
   
-
 
+
 
 
   
@@ -19496,8 +19502,8 @@
   
   
   
-
 
+
 
 
   
@@ -19524,15 +19530,15 @@
   
   
   
-
 
+
 
 
   
   
   
-
 
+
 
 
   
@@ -19552,8 +19558,8 @@
   
   
   
-
 
+
 
 
   
@@ -19699,8 +19705,8 @@
 
 
   
-  
   
+  
   
   
   
@@ -20066,10 +20072,10 @@
 
 
   
-  
   
+  
+  
   
-
 
 
 
@@ -20097,10 +20103,13 @@
 
 
 
+
   
   
-  
-  
+  
+
+
+  
   
   
 
@@ -20301,12 +20310,12 @@
 
   
   
-  
-  
   
+
 
-
   
+  
+  
   
   
   
@@ -20960,11 +20969,8 @@
 
   
   
-  
-
-
-  
   
+  
   
   
 
@@ -21302,7 +21308,7 @@
 
 
 
-
+
 
 
 
@@ -21333,8 +21339,8 @@
   
   
   
-  
-  
+  
+  
   
   
   
@@ -21496,70 +21502,69 @@
   
   
   
+  
+
+
+  
   
-  
-  
+  
+
+
+  
   
   
   
 
 
-
   
   
-  
-
-
-  
   
   
+
 
-
   
   
   
   
+  
+  
   
 
 
   
   
-  
-
-
-  
   
-  
-
-
-  
   
   
   
-  
-
-
-  
   
   
   
+  
+  
+  
+  
+
+
+  
+  
   
-
 
+
   
   
   
   
   
-
 
+
   
   
   
   




[08/14] mesos-site git commit: Updated the website built from mesos SHA: 103d6e0.

2018-02-14 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/functions_0x73.html
--
diff --git a/content/api/latest/c++/functions_0x73.html 
b/content/api/latest/c++/functions_0x73.html
index 6ac2515..e437bef 100644
--- a/content/api/latest/c++/functions_0x73.html
+++ b/content/api/latest/c++/functions_0x73.html
@@ -424,12 +424,12 @@
 signature
 : process::http::authentication::JWT
 
-SIGNED_INTEGER
-: JSON::Number
-
 signed_integer
 : JSON::Number
 
+SIGNED_INTEGER
+: JSON::Number
+
 size
 : mesos::internal::slave::FetcherProcess::Cache::Entry
 , mesos::Attributes
@@ -666,38 +666,36 @@
 starttime
 : proc::ProcessStatus
 
-startup()
-: org::apache::zookeeper::server::NIOServerCnxnFactory
-
 Startup()
 : mesos::internal::tests::MockCSIPlugin
 
-State
-: mesos::internal::slave::Executor
-
-state
-: routing::diagnosis::socket::Info
-, mesos::internal::master::Framework
-, mesos::internal::slave::Executor
-, mesos::internal::slave::Framework
-, mesos::internal::tests::ZooKeeperTest::TestWatcher::Event
-, proc::ProcessStatus
-, mesos::internal::slave::Http
+startup()
+: org::apache::zookeeper::server::NIOServerCnxnFactory
 
-State
-: mesos::internal::master::Framework
+State()
+: mesos::internal::StatusUpdateManagerProcess
 IDType, CheckpointType, UpdateType ::StatusUpdateStream::State
+, mesos::internal::master::Framework
 , mesos::internal::slave::Slave
 , mesos::internal::slave::Framework
 , mesos::state::protobuf::Variable
 T 
 , mesos::state::Variable
+, mesos::state::protobuf::State
 , mesos::state::State
 , mesos::internal::slave::state::State
 , mesos::internal::StatusUpdateManagerProcess
 IDType, CheckpointType, UpdateType ::State
-, mesos::internal::StatusUpdateManagerProcess
 IDType, CheckpointType, UpdateType ::StatusUpdateStream::State
-, mesos::state::protobuf::State
 
 state
-: mesos::internal::slave::Slave
+: routing::diagnosis::socket::Info
+, mesos::internal::master::Framework
+, mesos::internal::slave::Slave
+, mesos::internal::slave::Framework
+, mesos::internal::tests::ZooKeeperTest::TestWatcher::Event
+, proc::ProcessStatus
+, mesos::internal::slave::Http
+, mesos::internal::slave::Executor
+
+State
+: mesos::internal::slave::Executor
 
 STATE_HELP()
 : mesos::internal::slave::Http
@@ -705,12 +703,12 @@
 StateMachine()
 : process::StateMachine
 State 
 
-Statement
-: process::ControlFlow
 T 
-
 statement()
 : process::ControlFlow
 T 
 
+Statement
+: process::ControlFlow
 T 
+
 StaticVariable()
 : Jvm::StaticVariable
 T, name, signature 
 
@@ -804,12 +802,12 @@
 Stopwatch()
 : Stopwatch
 
-Storage()
-: mesos::state::Storage
-
 storage
 : process::network::unix::Address
 
+Storage()
+: mesos::state::Storage
+
 storage_
 : net::IP
 
@@ -877,15 +875,15 @@
 submitScheduler()
 : mesos::internal::master::Master
 
-Subprocess
-: process::Subprocess::ParentHook
-
 subprocess
-: process::Subprocess::IO
-, process::Subprocess
+: process::Subprocess
 
 Subprocess
 : process::Subprocess::IO
+, process::Subprocess::ParentHook
+
+subprocess
+: process::Subprocess::IO
 
 SubprocessLauncher()
 : mesos::internal::slave::SubprocessLauncher
@@ -1016,12 +1014,12 @@
 sysname
 : os::UTSInfo
 
-system
-: cgroups::cpuacct::Stats
-
 System()
 : process::System
 
+system
+: cgroups::cpuacct::Stats
+
 SystemStatus()
 : proc::SystemStatus
 

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/functions_0x74.html
--
diff --git a/content/api/latest/c++/functions_0x74.html 
b/content/api/latest/c++/functions_0x74.html
index 95fdc32..1afbfb0 100644
--- a/content/api/latest/c++/functions_0x74.html
+++ b/content/api/latest/c++/functions_0x74.html
@@ -206,14 +206,14 @@
 : mesos::internal::tests::cluster::Slave
 , process::grpc::client::Runtime
 
+TERMINATED
+: mesos::internal::slave::Executor
+
 terminated
 : mesos::internal::slave::TaskStatusUpdateStream
 , mesos::internal::StatusUpdateManagerProcess
 IDType, CheckpointType, UpdateType ::State::StreamState
 , mesos::internal::StatusUpdateManagerProcess
 IDType, CheckpointType, UpdateType ::StatusUpdateStream::State
 
-TERMINATED
-: mesos::internal::slave::Executor
-
 terminatedTasks
 : mesos::internal::slave::Executor
 
@@ -395,54 +395,58 @@
 : process::http::authentication::JWT::Header
 
 type
-: mesos::csi::paths::ContainerPath
+: mesos::internal::ResourceProviderMessage
+, process::internal::unwrap
 T 
+, process::http::Response
 
 Type
-: cgroups::devices::Entry::Selector
+: os::WindowsFD
 
 type
-: cgroups::devices::Entry::Selector
-, os::WindowsFD
-, boost::icl::interval_bound_type
 Interval T  
-, mesos::internal::FilesError
-, boost::icl::interval_traits
 Interval T  
-, mesos::internal::fs::MountTable::Entry
+: mesos::internal::log::tool::Benchmark::Flags
 , process::http::Request
-, mesos::internal::ResourceProviderMessage
+, mesos::internal::fs::MountTable::Entry
+, 

[14/14] mesos-site git commit: Updated the website built from mesos SHA: 103d6e0.

2018-02-14 Thread git-site-role
Updated the website built from mesos SHA: 103d6e0.


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

Branch: refs/heads/asf-site
Commit: 8b64bd2fc1de6fbf86ce8db77d06852c67479178
Parents: b41fc7f
Author: jenkins 
Authored: Wed Feb 14 11:28:43 2018 +
Committer: jenkins 
Committed: Wed Feb 14 11:28:43 2018 +

--
 content/api/latest/c++/Nodes.xml|  124 +-
 content/api/latest/c++/Tokens.xml   |  168 +-
 ...1_1internal_1_1master_1_1Master-members.html |  134 +-
 ...ssmesos_1_1internal_1_1master_1_1Master.html |   92 +-
 ...s_1_1internal_1_1slave_1_1Slave-members.html |   16 +-
 ...lassmesos_1_1internal_1_1slave_1_1Slave.html |  136 +-
 ...1internal_1_1tests_1_1MockSlave-members.html |  128 +-
 ...mesos_1_1internal_1_1tests_1_1MockSlave.html |  194 +-
 content/api/latest/c++/functions.html   |4 +-
 content/api/latest/c++/functions_0x61.html  |  163 +-
 content/api/latest/c++/functions_0x66.html  |   98 +-
 content/api/latest/c++/functions_0x68.html  |   44 +-
 content/api/latest/c++/functions_0x69.html  |   55 +-
 content/api/latest/c++/functions_0x6b.html  |   20 +-
 content/api/latest/c++/functions_0x6c.html  |6 +-
 content/api/latest/c++/functions_0x6d.html  |  107 +-
 content/api/latest/c++/functions_0x6e.html  |6 +-
 content/api/latest/c++/functions_0x70.html  |   12 +-
 content/api/latest/c++/functions_0x72.html  |   53 +-
 content/api/latest/c++/functions_0x73.html  |   70 +-
 content/api/latest/c++/functions_0x74.html  |   62 +-
 content/api/latest/c++/functions_0x75.html  |  115 +-
 content/api/latest/c++/functions_0x76.html  |   76 +-
 content/api/latest/c++/functions_0x77.html  |   14 +-
 content/api/latest/c++/functions_func.html  |4 +-
 content/api/latest/c++/functions_func_0x61.html |   94 +-
 content/api/latest/c++/functions_func_0x66.html |   26 +-
 content/api/latest/c++/functions_func_0x68.html |   18 +-
 content/api/latest/c++/functions_func_0x69.html |   39 +-
 content/api/latest/c++/functions_func_0x6d.html |   70 +-
 content/api/latest/c++/functions_func_0x70.html |   10 +-
 content/api/latest/c++/functions_func_0x72.html |   18 +-
 content/api/latest/c++/functions_func_0x73.html |   18 +-
 content/api/latest/c++/functions_func_0x75.html |   89 +-
 content/api/latest/c++/functions_func_0x76.html |   56 +-
 content/api/latest/c++/functions_func_0x77.html |6 +-
 content/api/latest/c++/functions_rela.html  |   10 +-
 content/api/latest/c++/functions_vars_0x66.html |   16 +-
 content/api/latest/c++/functions_vars_0x6d.html |6 +-
 content/api/latest/c++/index.hhc|   60 +-
 content/api/latest/c++/index.hhk|  257 +-
 .../c++/master_2validation_8hpp_source.html |2 +-
 .../api/latest/c++/mock__slave_8hpp_source.html |  249 +-
 .../latest/c++/protobuf__utils_8hpp_source.html |2 +-
 content/api/latest/c++/slave_8hpp_source.html   | 2151 -
 .../c++/src_2master_2master_8hpp_source.html| 4183 +-
 content/blog/feed.xml   |2 +-
 .../index.html  |2 +-
 48 files changed, 4911 insertions(+), 4374 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/Nodes.xml
--
diff --git a/content/api/latest/c++/Nodes.xml b/content/api/latest/c++/Nodes.xml
index 247d78f..8ce991d 100644
--- a/content/api/latest/c++/Nodes.xml
+++ b/content/api/latest/c++/Nodes.xml
@@ -7663,6 +7663,11 @@
 a2d4b5ce9e8d5ccd2c6aa826e9a9592a0


+addExecutor
+
classmesos_1_1internal_1_1master_1_1Master.html
+ab960ce75a31f64a96aa71633bc16faa9
+   
+   
 addFramework
 
classmesos_1_1internal_1_1master_1_1Master.html
 a18b954da472e546b37cf83a0cfa7c9ff
@@ -7680,7 +7685,7 @@

 addTask
 
classmesos_1_1internal_1_1master_1_1Master.html
-a9e5df43b0cd4c9beaf9091fdd4659593
+a10f25c965f9d60c388bd752e62a149b2


 agentReregisterTimeout
@@ -7888,6 +7893,11 @@
 adce7ba676c4f3bd04f892b8958fba3c4


+isLaunchExecutor
+

[09/14] mesos-site git commit: Updated the website built from mesos SHA: 103d6e0.

2018-02-14 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/functions_0x66.html
--
diff --git a/content/api/latest/c++/functions_0x66.html 
b/content/api/latest/c++/functions_0x66.html
index 1419498..a37ea88 100644
--- a/content/api/latest/c++/functions_0x66.html
+++ b/content/api/latest/c++/functions_0x66.html
@@ -296,60 +296,23 @@
 five
 : os::Load
 
-flags
-: mesos::internal::tests::CapabilitiesTestHelper
-, mesos::internal::tests::HttpServerTestHelper
-, mesos::internal::tests::KillPolicyTestHelper
-, internal::windows::SymbolicLink
-, proc::ProcessStatus
-, mesos::internal::slave::Http
-
-Flags
-: internal::windows::_REPARSE_DATA_BUFFER
-, mesos::internal::logging::Flags
-, mesos::internal::docker::Flags
-, mesos::internal::examples::Flags
-, systemd::Flags
-, mesos::internal::local::Flags
-, mesos::internal::log::tool::Benchmark::Flags
-, mesos::internal::log::tool::Initialize::Flags
-, mesos::internal::log::tool::Read::Flags
-, mesos::internal::log::tool::Replica::Flags
-, mesos::internal::master::Flags
-, mesos::internal::profile::Flags
-, mesos::internal::scheduler::Flags
-, mesos::v1::scheduler::Flags
-, mesos::internal::logger::Flags
+Flags()
+: mesos::internal::logger::Flags
 , mesos::internal::logger::rotate::Flags
 , mesos::internal::slave::IOSwitchboardServer::Flags
-
-flags
-: mesos::internal::tests::ActiveUserTestHelper
-
-Flags()
-: mesos::internal::slave::PortMappingUpdate::Flags
+, mesos::internal::slave::NetworkCniIsolatorSetup::Flags
+, mesos::internal::slave::PortMappingUpdate::Flags
 , mesos::internal::slave::PortMappingStatistics::Flags
 , mesos::internal::slave::MesosContainerizerLaunch::Flags
-
-flags
-: mesos::internal::slave::PortMappingUpdate
-
-Flags()
-: mesos::internal::slave::Flags
+, mesos::uri::HadoopFetcherPlugin::Flags
+, mesos::internal::slave::MesosContainerizerMount::Flags
+, mesos::internal::slave::Flags
 , mesos::internal::tests::ActiveUserTestHelper::Flags
 , mesos::internal::tests::CapabilitiesTestHelper::Flags
-
-flags
-: mesos::internal::logger::LogrotateContainerLogger
-
-Flags()
-: mesos::internal::tests::HttpServerTestHelper::Flags
+, mesos::internal::tests::Flags
+, mesos::internal::tests::HttpServerTestHelper::Flags
 , mesos::internal::tests::KillPolicyTestHelper::Flags
 , mesos::uri::DockerFetcherPlugin::Flags
-, mesos::uri::HadoopFetcherPlugin::Flags
-, mesos::internal::slave::NetworkCniIsolatorSetup::Flags
-, mesos::internal::slave::MesosContainerizerMount::Flags
-, mesos::internal::tests::Flags
 
 flags
 : mesos::internal::log::tool::Benchmark
@@ -357,12 +320,49 @@
 , mesos::internal::log::tool::Read
 , mesos::internal::log::tool::Replica
 , mesos::internal::profile::UriDiskProfileAdaptor
+, mesos::internal::logger::LogrotateContainerLogger
 , mesos::internal::slave::Subsystem
-, mesos::internal::slave::PosixFilesystemIsolatorProcess
-, mesos::internal::slave::NetworkCniIsolatorSetup
+
+Flags()
+: mesos::v1::scheduler::Flags
+
+flags
+: mesos::internal::slave::NetworkCniIsolatorSetup
+, mesos::internal::slave::PortMappingUpdate
 , mesos::internal::slave::PortMappingStatistics
+
+Flags()
+: mesos::internal::logging::Flags
+
+flags
+: mesos::internal::slave::MesosContainerizerMount
+, mesos::internal::tests::ActiveUserTestHelper
+, mesos::internal::tests::CapabilitiesTestHelper
+
+Flags()
+: mesos::internal::log::tool::Benchmark::Flags
+
+flags
+: mesos::internal::tests::KillPolicyTestHelper
+, internal::windows::SymbolicLink
+, proc::ProcessStatus
+, mesos::internal::slave::Http
+, mesos::internal::slave::PosixFilesystemIsolatorProcess
 , mesos::internal::slave::MesosContainerizerLaunch
-, mesos::internal::slave::MesosContainerizerMount
+, mesos::internal::tests::HttpServerTestHelper
+
+Flags
+: internal::windows::_REPARSE_DATA_BUFFER
+, mesos::internal::docker::Flags
+, mesos::internal::examples::Flags
+, systemd::Flags
+, mesos::internal::local::Flags
+, mesos::internal::log::tool::Initialize::Flags
+, mesos::internal::log::tool::Read::Flags
+, mesos::internal::log::tool::Replica::Flags
+, mesos::internal::master::Flags
+, mesos::internal::profile::Flags
+, mesos::internal::scheduler::Flags
 
 FLAGS_HELP()
 : mesos::internal::slave::Http

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/functions_0x68.html
--
diff --git a/content/api/latest/c++/functions_0x68.html 
b/content/api/latest/c++/functions_0x68.html
index 867e0f9..7a27dc8 100644
--- a/content/api/latest/c++/functions_0x68.html
+++ b/content/api/latest/c++/functions_0x68.html
@@ -120,6 +120,12 @@
 handle_
 : os::WindowsFD
 
+handleRunTaskGroupMessage()
+: mesos::internal::slave::Slave
+
+handleRunTaskMessage()
+: mesos::internal::slave::Slave
+
 hasDiscard()
 : process::Future
 T 
 
@@ -191,8 +197,8 @@
 , flags::FlagsBase
 
 HierarchicalAllocatorProcess()
-: 

[12/14] mesos-site git commit: Updated the website built from mesos SHA: 103d6e0.

2018-02-14 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/classmesos_1_1internal_1_1slave_1_1Slave.html
--
diff --git 
a/content/api/latest/c++/classmesos_1_1internal_1_1slave_1_1Slave.html 
b/content/api/latest/c++/classmesos_1_1internal_1_1slave_1_1Slave.html
index 6c91440..cd72fdc 100644
--- a/content/api/latest/c++/classmesos_1_1internal_1_1slave_1_1Slave.html
+++ b/content/api/latest/c++/classmesos_1_1internal_1_1slave_1_1Slave.html
@@ -105,16 +105,22 @@ Public Member Functions
 
 voiddoReliableRegistration
 (Duration maxBackoff)
 
-virtual voidrunTask
 (const process::UPID 
from, const FrameworkInfo frameworkInfo, const FrameworkID 
frameworkId, const process::UPID pid, const TaskInfo 
task, const std::vector ResourceVersionUUID  
resourceVersionUuids)
-
-voidrun
 (const FrameworkInfo frameworkInfo, ExecutorInfo executorInfo, Option TaskInfo  task, Option TaskGroupInfo  taskGroup, 
const std::vector ResourceVersionUUID  resourceVersionUuids, const 
process::UPID 
pid)
-
-virtual void_run
 (const process::Future std::list bool 
 unschedules, const FrameworkInfo frameworkInfo, const 
ExecutorInfo executorInfo, const Option TaskInfo  task, const Option TaskGroupInfo  
taskGroup, const std::vector ResourceVersionUUID  
resourceVersionUuids)
-
+voidhandleRunTaskMessage
 (const process::UPID 
from, RunTaskMessage runTaskMessage)
+
+virtual voidrunTask
 (const process::UPID 
from, const FrameworkInfo frameworkInfo, const FrameworkID 
frameworkId, const process::UPID pid, const TaskInfo 
task, const std::vector ResourceVersionUUID  
resourceVersionUuids, const Option bool  launchExecutor)
+
+voidrun
 (const FrameworkInfo frameworkInfo, ExecutorInfo executorInfo, Option TaskInfo  task, Option TaskGroupInfo  taskGroup, 
const std::vector ResourceVersionUUID  resourceVersionUuids, const 
process::UPID pid, 
const Option bool  launchExecutor)
+
+virtual void_run
 (const process::Future std::list bool 
 unschedules, const FrameworkInfo frameworkInfo, const 
ExecutorInfo executorInfo, const Option TaskInfo  task, const Option TaskGroupInfo  
taskGroup, const std::vector ResourceVersionUUID  
resourceVersionUuids, const Option bool  launchExecutor)
+
+virtual void__run
 (const process::Future std::list bool 
 future, const FrameworkInfo frameworkInfo, const 
ExecutorInfo executorInfo, const Option TaskInfo  task, const Option TaskGroupInfo  
taskGroup, const std::vector ResourceVersionUUID  
resourceVersionUuids, const Option bool  launchExecutor)
+
 virtual void___run
 (const process::Future Nothing  future, const FrameworkID 
frameworkId, const ExecutorID executorId, const ContainerID 
containerId, const std::list TaskInfo  tasks, const 
std::list TaskGroupInfo  taskGroups)
 
-virtual voidrunTaskGroup
 (const process::UPID 
from, const FrameworkInfo frameworkInfo, const ExecutorInfo 
executorInfo, const TaskGroupInfo taskGroupInfo, const 
std::vector ResourceVersionUUID  resourceVersionUuids)
-
+voidhandleRunTaskGroupMessage
 (const process::UPID 
from, RunTaskGroupMessage runTaskGroupMessage)
+
+virtual voidrunTaskGroup
 (const process::UPID 
from, const FrameworkInfo frameworkInfo, const ExecutorInfo 
executorInfo, const TaskGroupInfo taskGroupInfo, const 
std::vector ResourceVersionUUID  resourceVersionUuids, const Option bool  launchExecutor)
+
 virtual voidkillTask
 (const process::UPID 
from, const KillTaskMessage killTaskMessage)
 
 virtual voidshutdownExecutor
 (const process::UPID 
from, const FrameworkID frameworkId, const ExecutorID 
executorId)
@@ -182,8 +188,6 @@ Public Member Functions
 virtual voidexited
 (const process::UPID 
pid)
 Invoked when a linked 
process has exited.  More...
 
-void__run
 (const process::Future std::list bool 
 future, const FrameworkInfo frameworkInfo, const 
ExecutorInfo executorInfo, const Option TaskInfo  task, const Option TaskGroupInfo  
taskGroup, const std::vector ResourceVersionUUID  
resourceVersionUuids)
-
 process::Future Secret 
generateSecret
 (const FrameworkID frameworkId, const ExecutorID executorId, const 
ContainerID containerId)
 
 voidlaunchExecutor
 (const Option process::Future Secret  
future, const FrameworkID frameworkId, const ExecutorID 
executorId, const Option 
TaskInfo  taskInfo)
@@ -638,12 +642,15 @@ const http::Request
 
-
+
 
 
+
+  
+  
   
 
-  void mesos::internal::slave::Slave::__run 
+  virtual void 
mesos::internal::slave::Slave::__run 
   (
   const process::Future std::list bool 
 
   future, 
@@ -676,7 +683,13 @@ const http::Request
   
   const std::vector ResourceVersionUUID  

-  resourceVersionUuids
+  resourceVersionUuids, 
+
+
+  
+  
+  const Option bool  
+  launchExecutor
 
 
   
@@ -684,6 +697,11 @@ const http::Request
 
   
+  
+  
+virtual  
+  
+
 
 
 
@@ 

[10/14] mesos-site git commit: Updated the website built from mesos SHA: 103d6e0.

2018-02-14 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/classmesos_1_1internal_1_1tests_1_1MockSlave.html
--
diff --git 
a/content/api/latest/c++/classmesos_1_1internal_1_1tests_1_1MockSlave.html 
b/content/api/latest/c++/classmesos_1_1internal_1_1tests_1_1MockSlave.html
index a782814..8514593 100644
--- a/content/api/latest/c++/classmesos_1_1internal_1_1tests_1_1MockSlave.html
+++ b/content/api/latest/c++/classmesos_1_1internal_1_1tests_1_1MockSlave.html
@@ -81,18 +81,22 @@ Public Member Functions
 
 voidunmockedrun
 (const process::Future Nothing  future, const FrameworkID 
frameworkId, const ExecutorID executorId, const ContainerID 
containerId, const std::list TaskInfo  tasks, const 
std::list TaskGroupInfo  taskGroups)
 
-MOCK_METHOD6
 (runTask,
 void(const process::UPID 
from, const FrameworkInfo frameworkInfo, const FrameworkID 
frameworkId, const process::UPID pid, const TaskInfo 
task, const std::vector ResourceVersionUUID  
resourceVersionUuids))
-
-voidunmocked_runTask
 (const process::UPID 
from, const FrameworkInfo frameworkInfo, const FrameworkID 
frameworkId, const process::UPID pid, const TaskInfo 
task, const std::vector ResourceVersionUUID  
resourceVersionUuids)
-
-MOCK_METHOD6
 (_run,
 void(const process::Future std::list bool 
 unschedules, const FrameworkInfo frameworkInfo, const 
ExecutorInfo executorInfo, const Option TaskInfo  task, const Option TaskGroupInfo  
taskGroup, const std::vector ResourceVersionUUID  
resourceVersionUuids))
-
-voidunmocked__run
 (const process::Future std::list bool 
 unschedules, const FrameworkInfo frameworkInfo, const 
ExecutorInfo executorInfo, const Option TaskInfo  task, const Option TaskGroupInfo  
taskGroup, const std::vector ResourceVersionUUID  
resourceVersionUuids)
-
-MOCK_METHOD5
 (runTaskGroup,
 void(const process::UPID 
from, const FrameworkInfo frameworkInfo, const ExecutorInfo 
executorInfo, const TaskGroupInfo taskGroup, const std::vector 
ResourceVersionUUID  resourceVersionUuids))
-
-voidunmocked_runTaskGroup
 (const process::UPID 
from, const FrameworkInfo frameworkInfo, const ExecutorInfo 
executorInfo, const TaskGroupInfo taskGroup, const std::vector 
ResourceVersionUUID  resourceVersionUuids)
-
+MOCK_METHOD7
 (runTask,
 void(const process::UPID 
from, const FrameworkInfo frameworkInfo, const FrameworkID 
frameworkId, const process::UPID pid, const TaskInfo 
task, const std::vector ResourceVersionUUID  
resourceVersionUuids, const Option bool  launchExecutor))
+
+voidunmocked_runTask
 (const process::UPID 
from, const FrameworkInfo frameworkInfo, const FrameworkID 
frameworkId, const process::UPID pid, const TaskInfo 
task, const std::vector ResourceVersionUUID  
resourceVersionUuids, const Option bool  launchExecutor)
+
+MOCK_METHOD7
 (_run,
 void(const process::Future std::list bool 
 unschedules, const FrameworkInfo frameworkInfo, const 
ExecutorInfo executorInfo, const Option TaskInfo  task, const Option TaskGroupInfo  
taskGroup, const std::vector ResourceVersionUUID  
resourceVersionUuids, const Option bool  launchExecutor))
+
+voidunmocked__run
 (const process::Future std::list bool 
 unschedules, const FrameworkInfo frameworkInfo, const 
ExecutorInfo executorInfo, const Option TaskInfo  task, const Option TaskGroupInfo  
taskGroup, const std::vector ResourceVersionUUID  
resourceVersionUuids, const Option bool  launchExecutor)
+
+MOCK_METHOD7
 (__run,
 void(const process::Future std::list bool 
 future, const FrameworkInfo frameworkInfo, const 
ExecutorInfo executorInfo, const Option TaskInfo  task, const Option TaskGroupInfo  
taskGroup, const std::vector ResourceVersionUUID  
resourceVersionUuids, const Option bool  launchExecutor))
+
+voidunmocked___run
 (const process::Future std::list bool 
 future, const FrameworkInfo frameworkInfo, const 
ExecutorInfo executorInfo, const Option TaskInfo  task, const Option TaskGroupInfo  
taskGroup, const std::vector ResourceVersionUUID  
resourceVersionUuids, const Option bool  launchExecutor)
+
+MOCK_METHOD6
 (runTaskGroup,
 void(const process::UPID 
from, const FrameworkInfo frameworkInfo, const ExecutorInfo 
executorInfo, const TaskGroupInfo taskGroup, const std::vector 
ResourceVersionUUID  resourceVersionUuids, const Option bool  launchExecutor))
+
+voidunmocked_runTaskGroup
 (const process::UPID 
from, const FrameworkInfo frameworkInfo, const ExecutorInfo 
executorInfo, const TaskGroupInfo taskGroup, const std::vector 
ResourceVersionUUID  resourceVersionUuids, const Option bool  launchExecutor)
+
 MOCK_METHOD2
 (killTask,
 void(const process::UPID 
from, const KillTaskMessage killTaskMessage))
 
 voidunmocked_killTask
 (const process::UPID 
from, const KillTaskMessage killTaskMessage)
@@ -140,16 +144,22 @@ Public Member Functions
 
 voiddoReliableRegistration
 (Duration maxBackoff)
 
-virtual voidrunTask
 (const process::UPID 
from, const FrameworkInfo frameworkInfo, const 

[06/14] mesos-site git commit: Updated the website built from mesos SHA: 103d6e0.

2018-02-14 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/index.hhc
--
diff --git a/content/api/latest/c++/index.hhc b/content/api/latest/c++/index.hhc
index 3d89c1d..1dafd27 100644
--- a/content/api/latest/c++/index.hhc
+++ b/content/api/latest/c++/index.hhc
@@ -2125,10 +2125,11 @@
 
 
 
+
 
 
 
-
+
 
 
 
@@ -2170,6 +2171,7 @@
 
 
 
+
 
 
 
@@ -3739,7 +3741,7 @@
 
 
 
-
+
 
 
 
@@ -3747,7 +3749,7 @@
 
 
 
-
+
 
 
 
@@ -3776,6 +3778,8 @@
 
 
 
+
+
 
 
 
@@ -3794,9 +3798,9 @@
 
 
 
-
-
-
+
+
+
 
 
 
@@ -4425,20 +4429,22 @@
 
 
 
-
 
-
-
+
+
+
+
 
 
-
+
+
 
 
 
 
 
-
-
+
+
 
 
 
@@ -20908,10 +20914,11 @@
 
 
 
+
 
 
 
-
+
 
 
 
@@ -20953,6 +20960,7 @@
 
 
 
+
 
 
 
@@ -23648,7 +23656,7 @@
 
 
 
-
+
 
 
 
@@ -23656,7 +23664,7 @@
 
 
 
-
+
 
 
 
@@ -23685,6 +23693,8 @@
 
 
 
+
+
 
 
 
@@ -23703,9 +23713,9 @@
 
 
 
-
-
-
+
+
+
 
 
 
@@ -24820,20 +24830,22 @@
 
 
 
-
 
-
-
+
+
+
+
 
 
-
+
+
 
 
 
 
 
-
-
+
+
 
 
 



[04/14] mesos-site git commit: Updated the website built from mesos SHA: 103d6e0.

2018-02-14 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/master_2validation_8hpp_source.html
--
diff --git a/content/api/latest/c++/master_2validation_8hpp_source.html 
b/content/api/latest/c++/master_2validation_8hpp_source.html
index 072b3bd..61b4511 100644
--- a/content/api/latest/c++/master_2validation_8hpp_source.html
+++ b/content/api/latest/c++/master_2validation_8hpp_source.html
@@ -407,7 +407,7 @@
 mesos::internal::master::validation::offer::getOfferOffer * getOffer(Master *master, const OfferID 
offerId)
 mesos::internal::master::validation::resource::internal::validateSingleResourceProviderOption Error  validateSingleResourceProvider(const 
google::protobuf::RepeatedPtrField Resource  resources)
 cgroups::createTry Nothing  create(const std::string hierarchy, 
const std::string cgroup, bool recursive=false)
-mesos::internal::master::FrameworkDefinition: master.hpp:2151
+mesos::internal::master::FrameworkDefinition: master.hpp:2160
 mesos::internal::master::validation::executor::internal::validateResourcesOption Error  validateResources(const ExecutorInfo 
executor)
 mesos::internal::master::MasterDefinition: master.hpp:392
 mesos::internal::master::validation::task::validateOption Error  validate(const TaskInfo task, 
Framework *framework, Slave *slave, const Resources offered)

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/mock__slave_8hpp_source.html
--
diff --git a/content/api/latest/c++/mock__slave_8hpp_source.html 
b/content/api/latest/c++/mock__slave_8hpp_source.html
index bd48ef0..2dbb6d4 100644
--- a/content/api/latest/c++/mock__slave_8hpp_source.html
+++ b/content/api/latest/c++/mock__slave_8hpp_source.html
@@ -171,126 +171,153 @@
   117 
 const std::listTaskInfo 
tasks,
   118 
 const std::listTaskGroupInfo 
taskGroups);
   
119
-  120 
 MOCK_METHOD6(runTask,
 void(
+  120 
 MOCK_METHOD7(runTask,
 void(
   121 
 const process::UPID from,
   122 
 const FrameworkInfo frameworkInfo,
   123 
 const FrameworkID frameworkId,
   124 
 const process::UPID pid,
   125 
 const TaskInfo task,
-  126 
 const 
std::vectorResourceVersionUUID resourceVersionUuids));
-  
127
-  128 
 void unmocked_runTask(
-  129 
 const process::UPID from,
-  130 
 const FrameworkInfo frameworkInfo,
-  131 
 const FrameworkID frameworkId,
-  132 
 const process::UPID pid,
-  133 
 const TaskInfo task,
-  134 
 const 
std::vectorResourceVersionUUID resourceVersionUuids);
-  
135
-  136 
 MOCK_METHOD6(_run,
 void(
-  137 
 const process::Futurestd::listbool
 unschedules,
-  138 
 const FrameworkInfo frameworkInfo,
-  139 
 const ExecutorInfo executorInfo,
-  140 
 const OptionTaskInfo task,
-  141 
 const OptionTaskGroupInfo taskGroup,
-  142 
 const 
std::vectorResourceVersionUUID resourceVersionUuids));
-  
143
-  144 
 void unmocked__run(
-  145 
 const process::Futurestd::listbool
 unschedules,
-  146 
 const FrameworkInfo frameworkInfo,
-  147 
 const ExecutorInfo executorInfo,
-  148 
 const OptionTaskInfo task,
-  149 
 const OptionTaskGroupInfo taskGroup,
-  150 
 const 
std::vectorResourceVersionUUID resourceVersionUuids);
-  
151
-  152 
 MOCK_METHOD5(runTaskGroup,
 void(
-  153 
 const process::UPID from,
-  154 
 const FrameworkInfo frameworkInfo,
-  155 
 const ExecutorInfo executorInfo,
-  156 
 const TaskGroupInfo taskGroup,
-  157 
 const 
std::vectorResourceVersionUUID resourceVersionUuids));
-  
158
-  159 
 void unmocked_runTaskGroup(
-  160 
 const process::UPID from,
-  161 
 const FrameworkInfo frameworkInfo,
-  162 
 const ExecutorInfo executorInfo,
-  163 
 const TaskGroupInfo taskGroup,
-  164 
 const 
std::vectorResourceVersionUUID resourceVersionUuids);
-  
165
-  166 
 MOCK_METHOD2(killTask,
 void(
-  167 
 const process::UPID from,
-  168 
 const KillTaskMessage 
killTaskMessage));
-  
169
-  170 
 void unmocked_killTask(
-  171 
 const process::UPID from,
-  172 
 const KillTaskMessage 
killTaskMessage);
+  126 
 const 
std::vectorResourceVersionUUID resourceVersionUuids,
+  127 
 const Optionbool launchExecutor));
+  
128
+  129 
 void unmocked_runTask(
+  130 
 const process::UPID from,
+  131 
 const FrameworkInfo frameworkInfo,
+  132 
 const FrameworkID frameworkId,
+  133 
 const process::UPID pid,
+  134 
 const TaskInfo task,
+  135 
 const 
std::vectorResourceVersionUUID resourceVersionUuids,
+  136 
 const Optionbool launchExecutor);
+  
137
+  138 
 MOCK_METHOD7(_run,
 void(
+  139 
 const process::Futurestd::listbool
 unschedules,
+  140 
 const FrameworkInfo frameworkInfo,
+  141 
 const ExecutorInfo executorInfo,
+  142 
 const OptionTaskInfo task,
+  143 
 

[02/14] mesos-site git commit: Updated the website built from mesos SHA: 103d6e0.

2018-02-14 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/8b64bd2f/content/api/latest/c++/src_2master_2master_8hpp_source.html
--
diff --git a/content/api/latest/c++/src_2master_2master_8hpp_source.html 
b/content/api/latest/c++/src_2master_2master_8hpp_source.html
index 6641229..03db6c2 100644
--- a/content/api/latest/c++/src_2master_2master_8hpp_source.html
+++ b/content/api/latest/c++/src_2master_2master_8hpp_source.html
@@ -845,2092 +845,2101 @@
   859 
 const Offer::Operation::Destroy destroy,
   860 
 const Optionprocess::http::authentication::Principal
 principal);
   
861
-  862 
 // Add the task and its executor (if not already 
running) to the
-  863 
 // framework and slave. Returns the resources consumed 
as a result,
-  864 
 // which includes resources for the task and its 
executor
-  865 
 // (if not already running).
-  866 
 Resources addTask(const TaskInfo task, Framework* 
framework, Slave* slave);
+  862 
 // Determine if a new executor needs to be 
launched.
+  863 
 bool isLaunchExecutor
 (
+  864 
 const ExecutorID executorId,
+  865 
 Framework* 
framework,
+  866 
 Slave* slave) const;
   
867
-  868 
 // Transitions the task, and recovers resources if the 
task becomes
-  869 
 // terminal.
-  870 
 void updateTask(Task*
 task, const StatusUpdate update);
-  
871
-  872 
 // Removes the task. `unreachable` indicates whether the 
task is removed due
-  873 
 // to being unreachable. Note that we cannot rely on the 
task state because
-  874 
 // it may not reflect unreachability due to being set to 
TASK_LOST for
-  875 
 // backwards compatibility.
-  876 
 void removeTask(Task*
 task, bool unreachable = false);
-  
877
-  878 
 // Remove an executor and recover its 
resources.
-  879 
 void removeExecutor(
-  880 
 Slave* slave,
-  881 
 const FrameworkID frameworkId,
-  882 
 const ExecutorID executorId);
-  
883
-  884 
 // Adds the given operation to the framework and the 
agent.
-  885 
 void addOperation(
-  886 
 Framework* 
framework,
-  887 
 Slave* slave,
-  888 
 Operation*
 operation);
-  
889
-  890 
 // Transitions the operation, and updates and recovers 
resources if
-  891 
 // the operation becomes terminal. If `convertResources` 
is `false`
-  892 
 // only the consumed resources of terminal operations 
are recovered,
-  893 
 // but no resources are converted.
-  894 
 void updateOperation(
-  895 
 Operation*
 operation,
-  896 
 const UpdateOperationStatusMessage 
update,
-  897 
 bool convertResources = true);
+  868 
 // Add executor to the framework and slave.
+  869 
 void addExecutor(
+  870 
 const ExecutorInfo executorInfo,
+  871 
 Framework* 
framework,
+  872 
 Slave* slave);
+  
873
+  874 
 // Add task to the framework and slave.
+  875 
 void addTask(const TaskInfo task, Framework* 
framework, Slave* slave);
+  
876
+  877 
 // Transitions the task, and recovers resources if the 
task becomes
+  878 
 // terminal.
+  879 
 void updateTask(Task*
 task, const StatusUpdate update);
+  
880
+  881 
 // Removes the task. `unreachable` indicates whether the 
task is removed due
+  882 
 // to being unreachable. Note that we cannot rely on the 
task state because
+  883 
 // it may not reflect unreachability due to being set to 
TASK_LOST for
+  884 
 // backwards compatibility.
+  885 
 void removeTask(Task*
 task, bool unreachable = false);
+  
886
+  887 
 // Remove an executor and recover its 
resources.
+  888 
 void removeExecutor(
+  889 
 Slave* slave,
+  890 
 const FrameworkID frameworkId,
+  891 
 const ExecutorID executorId);
+  
892
+  893 
 // Adds the given operation to the framework and the 
agent.
+  894 
 void addOperation(
+  895 
 Framework* 
framework,
+  896 
 Slave* slave,
+  897 
 Operation*
 operation);
   
898
-  899 
 // Remove the operation.
-  900 
 void removeOperation(Operation*
 operation);
-  
901
-  902 
 // Attempts to update the allocator by applying the 
given operation.
-  903 
 // If successful, updates the slaves resources, 
sends a
-  904 
 // CheckpointResourcesMessage to the slave 
with the updated
-  905 
 // checkpointed resources, and returns a 
Future with Nothing.
-  906 
 // Otherwise, no action is taken and returns a failed 
Future.
-  907 
 process::FutureNothing apply(
-  908 
 Slave* slave,
-  909 
 const Offer::Operation
 operation);
+  899 
 // Transitions the operation, and updates and recovers 
resources if
+  900 
 // the operation becomes terminal. If `convertResources` 
is `false`
+  901 
 // only the consumed resources of terminal operations 
are recovered,
+  902 
 // but no resources are converted.
+  903 
 void updateOperation(
+  904 
 Operation*
 operation,
+  905 
 const UpdateOperationStatusMessage 
update,
+  906 
 bool convertResources = true);
+  
907
+  908 
 // Remove the operation.
+  909 
 void 

[5/8] mesos git commit: Added a test to ensure master removes executors that never launched.

2018-02-14 Thread grag
Added a test to ensure master removes executors that never launched.

This test ensures that the agent sends `ExitedExecutorMessage` when
the executor is never launched so that the master's executor
bookkeeping entry is removed. See MESOS-1720.

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


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

Branch: refs/heads/master
Commit: a6c065060d94dc04dcdc81021035d846ad7040a0
Parents: b5350fe
Author: Meng Zhu 
Authored: Tue Feb 13 22:45:16 2018 -0800
Committer: Greg Mann 
Committed: Wed Feb 14 02:34:20 2018 -0800

--
 src/tests/slave_tests.cpp | 156 +
 1 file changed, 156 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/a6c06506/src/tests/slave_tests.cpp
--
diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp
index 55cb579..6631c05 100644
--- a/src/tests/slave_tests.cpp
+++ b/src/tests/slave_tests.cpp
@@ -4571,6 +4571,162 @@ TEST_F(SlaveTest, KillTaskUnregisteredHTTPExecutor)
 }
 
 
+// This test ensures that the agent sends an `ExitedExecutorMessage` when the
+// executor is never launched, so that the master's executor bookkeeping entry
+// is removed. See MESOS-1720.
+TEST_F(SlaveTest, RemoveExecutorUponFailedLaunch)
+{
+  master::Flags masterFlags = CreateMasterFlags();
+  Try master = StartMaster(masterFlags);
+  ASSERT_SOME(master);
+
+  MockExecutor exec(DEFAULT_EXECUTOR_ID);
+  TestContainerizer containerizer();
+
+  slave::Flags slaveFlags = CreateSlaveFlags();
+  slaveFlags.resources = "cpus:2;mem:512;disk:512;ports:[]";
+
+  Owned detector = master.get()->createDetector();
+
+  // Start a mock slave.
+  Try slave =
+StartSlave(detector.get(), , slaveFlags, true);
+
+  ASSERT_SOME(slave);
+  ASSERT_NE(nullptr, slave.get()->mock());
+
+  slave.get()->start();
+
+  MockScheduler sched;
+  MesosSchedulerDriver driver(
+  , DEFAULT_FRAMEWORK_INFO, master.get()->pid, DEFAULT_CREDENTIAL);
+
+  EXPECT_CALL(sched, registered(_, _, _));
+
+  Future offers;
+  EXPECT_CALL(sched, resourceOffers(, _))
+.WillOnce(FutureArg<1>())
+.WillRepeatedly(Return()); // Ignore subsequent offers.
+
+  driver.start();
+
+  AWAIT_READY(offers);
+  ASSERT_FALSE(offers->empty());
+
+  Resources executorResources = Resources::parse("cpus:0.1;mem:32").get();
+  executorResources.allocate("*");
+
+  TaskInfo task;
+  task.set_name("");
+  task.mutable_task_id()->set_value("1");
+  task.mutable_slave_id()->MergeFrom(offers.get()[0].slave_id());
+  task.mutable_resources()->MergeFrom(
+  Resources(offers.get()[0].resources()) - executorResources);
+
+  task.mutable_executor()->MergeFrom(DEFAULT_EXECUTOR_INFO);
+  task.mutable_executor()->mutable_resources()->CopyFrom(executorResources);
+
+  EXPECT_CALL(exec, registered(_, _, _, _))
+.Times(0);
+
+  Future killTaskStatus;
+  EXPECT_CALL(sched, statusUpdate(, _))
+.WillOnce(FutureArg<1>());
+
+  Future exitedExecutorMessage =
+FUTURE_PROTOBUF(ExitedExecutorMessage(), _, _);
+
+  // Saved arguments from `Slave::_run()`.
+  Future unschedules;
+  FrameworkInfo frameworkInfo;
+  ExecutorInfo executorInfo_;
+  Option taskGroup_;
+  Option task_;
+  vector resourceVersionUuids;
+  Option launchExecutor;
+
+  // Before launching the executor in `__run`, we kill the task, so that
+  // no executor is launched.
+  Future _run;
+  EXPECT_CALL(*slave.get()->mock(), _run(_, _, _, _, _, _, _))
+.WillOnce(DoAll(FutureSatisfy(&_run),
+  SaveArg<0>(),
+  SaveArg<1>(),
+  SaveArg<2>(_),
+  SaveArg<3>(_),
+  SaveArg<4>(_),
+  SaveArg<5>(),
+  SaveArg<6>()));
+
+  driver.launchTasks(offers.get()[0].id(), {task});
+
+  AWAIT_READY(_run);
+
+  Future killTask;
+  EXPECT_CALL(*slave.get()->mock(), killTask(_, _))
+.WillOnce(DoAll(Invoke(slave.get()->mock(),
+   ::unmocked_killTask),
+FutureSatisfy()));
+
+  driver.killTask(task.task_id());
+
+  AWAIT_READY(killTask);
+
+  process::dispatch(slave.get()->pid, [&] {
+slave.get()->mock()->unmocked__run(
+unschedules,
+frameworkInfo,
+executorInfo_,
+task_,
+taskGroup_,
+resourceVersionUuids,
+launchExecutor);
+  });
+
+  // Agent needs to send `ExitedExecutorMessage` to the master because
+  // the executor never launched.
+  AWAIT_READY(exitedExecutorMessage);
+
+  // Helper function to post a request to '/api/v1' 

[3/8] mesos git commit: Added helper function for the agent to send `ExitedExecutorMessage`.

2018-02-14 Thread grag
Added helper function for the agent to send `ExitedExecutorMessage`.

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


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

Branch: refs/heads/master
Commit: 0321b85ce66f21e9cb6990a3032cb7f8f709c6e6
Parents: ce7f1f6
Author: Meng Zhu 
Authored: Tue Feb 13 22:45:03 2018 -0800
Committer: Greg Mann 
Committed: Wed Feb 14 02:31:11 2018 -0800

--
 src/slave/slave.cpp | 25 ++---
 src/slave/slave.hpp |  5 +
 2 files changed, 23 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/0321b85c/src/slave/slave.cpp
--
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 893a196..f96c97e 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -6071,13 +6071,7 @@ void Slave::executorTerminated(
   // are generated by the slave.
   // TODO(vinod): Reliably forward this message to the master.
   if (!executor->isGeneratedForCommandTask()) {
-ExitedExecutorMessage message;
-message.mutable_slave_id()->MergeFrom(info.id());
-message.mutable_framework_id()->MergeFrom(frameworkId);
-message.mutable_executor_id()->MergeFrom(executorId);
-message.set_status(status);
-
-if (master.isSome()) { send(master.get(), message); }
+sendExitedExecutorMessage(frameworkId, executorId, status);
   }
 
   // Remove the executor if either the slave or framework is
@@ -8295,6 +8289,23 @@ void Slave::sendExecutorTerminatedStatusUpdate(
 }
 
 
+void Slave::sendExitedExecutorMessage(
+const FrameworkID& frameworkId,
+const ExecutorID& executorId,
+const Option& status)
+{
+  ExitedExecutorMessage message;
+  message.mutable_slave_id()->MergeFrom(info.id());
+  message.mutable_framework_id()->MergeFrom(frameworkId);
+  message.mutable_executor_id()->MergeFrom(executorId);
+  message.set_status(status.getOrElse(-1));
+
+  if (master.isSome()) {
+send(master.get(), message);
+  }
+}
+
+
 // TODO(dhamon): Move these to their own metrics.hpp|cpp.
 double Slave::_tasks_staging()
 {

http://git-wip-us.apache.org/repos/asf/mesos/blob/0321b85c/src/slave/slave.hpp
--
diff --git a/src/slave/slave.hpp b/src/slave/slave.hpp
index b2c7880..7840ce8 100644
--- a/src/slave/slave.hpp
+++ b/src/slave/slave.hpp
@@ -615,6 +615,11 @@ private:
   const FrameworkID& frameworkId,
   const Executor* executor);
 
+  void sendExitedExecutorMessage(
+  const FrameworkID& frameworkId,
+  const ExecutorID& executorId,
+  const Option& status = None());
+
   // Forwards the current total of oversubscribed resources.
   void forwardOversubscribed();
   void _forwardOversubscribed(



[6/8] mesos git commit: Added a mock method for `__run()` to the mock slave.

2018-02-14 Thread grag
Added a mock method for `__run()` to the mock slave.

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


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

Branch: refs/heads/master
Commit: a8e723b6ca5a268cc97e39919f7a6b4aedfc3222
Parents: a6c0650
Author: Meng Zhu 
Authored: Tue Feb 13 22:45:21 2018 -0800
Committer: Greg Mann 
Committed: Wed Feb 14 02:35:37 2018 -0800

--
 src/slave/slave.hpp  | 20 ++--
 src/tests/mock_slave.cpp | 22 ++
 src/tests/mock_slave.hpp | 18 ++
 3 files changed, 50 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/a8e723b6/src/slave/slave.hpp
--
diff --git a/src/slave/slave.hpp b/src/slave/slave.hpp
index 9cd3597..42c3ebc 100644
--- a/src/slave/slave.hpp
+++ b/src/slave/slave.hpp
@@ -179,6 +179,16 @@ public:
   const std::vector& resourceVersionUuids,
   const Option& launchExecutor);
 
+  // Made 'virtual' for Slave mocking.
+  virtual void __run(
+  const process::Future& future,
+  const FrameworkInfo& frameworkInfo,
+  const ExecutorInfo& executorInfo,
+  const Option& task,
+  const Option& taskGroup,
+  const std::vector& resourceVersionUuids,
+  const Option& launchExecutor);
+
   // This is called when the resource limits of the container have
   // been updated for the given tasks and task groups. If the update is
   // successful, we flush the given tasks to the executor by sending
@@ -410,16 +420,6 @@ public:
   virtual void finalize();
   virtual void exited(const process::UPID& pid);
 
-  void __run(
-  const process::Future& future,
-  const FrameworkInfo& frameworkInfo,
-  const ExecutorInfo& executorInfo,
-  const Option& task,
-  const Option& taskGroup,
-  const std::vector& resourceVersionUuids,
-  const Option& launchExecutor);
-
-
   process::Future generateSecret(
   const FrameworkID& frameworkId,
   const ExecutorID& executorId,

http://git-wip-us.apache.org/repos/asf/mesos/blob/a8e723b6/src/tests/mock_slave.cpp
--
diff --git a/src/tests/mock_slave.cpp b/src/tests/mock_slave.cpp
index 9b06b9c..8ec55b6 100644
--- a/src/tests/mock_slave.cpp
+++ b/src/tests/mock_slave.cpp
@@ -130,6 +130,8 @@ MockSlave::MockSlave(
 .WillRepeatedly(Invoke(this, ::unmocked_runTask));
   EXPECT_CALL(*this, _run(_, _, _, _, _, _, _))
 .WillRepeatedly(Invoke(this, ::unmocked__run));
+  EXPECT_CALL(*this, __run(_, _, _, _, _, _, _))
+.WillRepeatedly(Invoke(this, ::unmocked___run));
   EXPECT_CALL(*this, runTaskGroup(_, _, _, _, _, _))
 .WillRepeatedly(Invoke(this, ::unmocked_runTaskGroup));
   EXPECT_CALL(*this, killTask(_, _))
@@ -209,6 +211,26 @@ void MockSlave::unmocked__run(
 }
 
 
+void MockSlave::unmocked___run(
+const Future& future,
+const FrameworkInfo& frameworkInfo,
+const ExecutorInfo& executorInfo,
+const Option& task,
+const Option& taskGroup,
+const std::vector& resourceVersionUuids,
+const Option& launchExecutor)
+{
+  slave::Slave::__run(
+  future,
+  frameworkInfo,
+  executorInfo,
+  task,
+  taskGroup,
+  resourceVersionUuids,
+  launchExecutor);
+}
+
+
 void MockSlave::unmocked_runTaskGroup(
 const UPID& from,
 const FrameworkInfo& frameworkInfo,

http://git-wip-us.apache.org/repos/asf/mesos/blob/a8e723b6/src/tests/mock_slave.hpp
--
diff --git a/src/tests/mock_slave.hpp b/src/tests/mock_slave.hpp
index 9ed3e55..8ec2b65 100644
--- a/src/tests/mock_slave.hpp
+++ b/src/tests/mock_slave.hpp
@@ -153,6 +153,24 @@ public:
   const std::vector& resourceVersionUuids,
   const Option& launchExecutor);
 
+  MOCK_METHOD7(__run, void(
+  const process::Future& future,
+  const FrameworkInfo& frameworkInfo,
+  const ExecutorInfo& executorInfo,
+  const Option& task,
+  const Option& taskGroup,
+  const std::vector& resourceVersionUuids,
+  const Option& launchExecutor));
+
+  void unmocked___run(
+  const process::Future& future,
+  const FrameworkInfo& frameworkInfo,
+  const ExecutorInfo& executorInfo,
+  const Option& task,
+  const Option& taskGroup,
+  const std::vector& resourceVersionUuids,
+  const Option& launchExecutor);
+
   MOCK_METHOD6(runTaskGroup, void(
   const process::UPID& from,
   const FrameworkInfo& frameworkInfo,



[8/8] mesos git commit: Added MESOS-1720 to the 1.5.1 CHANGELOG.

2018-02-14 Thread grag
Added MESOS-1720 to the 1.5.1 CHANGELOG.


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

Branch: refs/heads/master
Commit: 103d6e06a149c634d540557d311ccadfac8b57c8
Parents: 3e3c582
Author: Greg Mann 
Authored: Wed Feb 14 02:40:32 2018 -0800
Committer: Greg Mann 
Committed: Wed Feb 14 02:40:32 2018 -0800

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/103d6e06/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 091cff6..3b4b49d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -10,6 +10,7 @@ Release Notes - Mesos - Version 1.5.1 (WIP)
  * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
  * [MESOS-8565] - Persistent volumes are not visible in Mesos UI when 
launching a pod using default executor.
  * [MESOS-8577] - Destroy nested container if 
`LAUNCH_NESTED_CONTAINER_SESSION` fails.
+ * [MESOS-1720] - Slave should send exited executor message when the executor 
is never launched.
 
 
 Release Notes - Mesos - Version 1.5.0



[7/8] mesos git commit: Added tests to check that executors which fail to launch are removed.

2018-02-14 Thread grag
Added tests to check that executors which fail to launch are removed.

Theses tests ensure that the agent sends `ExitedExecutorMessage` when
a task group fails to launch due to unschedule GC failure, or when a
task fails to launch due to task authorization failure.

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


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

Branch: refs/heads/master
Commit: 3e3c582f10e8154e4a76c2b481cc33c8d4d0310c
Parents: a8e723b
Author: Meng Zhu 
Authored: Tue Feb 13 22:45:23 2018 -0800
Committer: Greg Mann 
Committed: Wed Feb 14 02:36:03 2018 -0800

--
 src/tests/slave_tests.cpp | 305 +
 1 file changed, 305 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/3e3c582f/src/tests/slave_tests.cpp
--
diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp
index 6631c05..d2c242e 100644
--- a/src/tests/slave_tests.cpp
+++ b/src/tests/slave_tests.cpp
@@ -4727,6 +4727,311 @@ TEST_F(SlaveTest, RemoveExecutorUponFailedLaunch)
 }
 
 
+// This test ensures that agent sends ExitedExecutorMessage when the task group
+// fails to launch due to unschedule GC failure and that master's executor
+// bookkeeping entry is removed.
+TEST_F(SlaveTest, RemoveExecutorUponFailedTaskGroupLaunch)
+{
+  Try master = StartMaster();
+  ASSERT_SOME(master);
+
+  auto scheduler = std::make_shared();
+
+  Owned detector = master.get()->createDetector();
+
+  // Start a mock slave.
+  Try slave =
+StartSlave(detector.get(), CreateSlaveFlags(), true);
+
+  ASSERT_SOME(slave);
+  ASSERT_NE(nullptr, slave.get()->mock());
+
+  slave.get()->start();
+
+  v1::Resources resources =
+v1::Resources::parse("cpus:0.1;mem:32;disk:32").get();
+
+  v1::ExecutorInfo executorInfo = v1::DEFAULT_EXECUTOR_INFO;
+  executorInfo.clear_command();
+  executorInfo.set_type(v1::ExecutorInfo::DEFAULT);
+  executorInfo.mutable_resources()->CopyFrom(resources);
+
+  Future connected;
+  EXPECT_CALL(*scheduler, connected(_))
+.WillOnce(FutureSatisfy());
+
+  v1::scheduler::TestMesos mesos(
+master.get()->pid,
+ContentType::PROTOBUF,
+scheduler);
+
+  AWAIT_READY(connected);
+
+  Future subscribed;
+  EXPECT_CALL(*scheduler, subscribed(_, _))
+.WillOnce(FutureArg<1>());
+
+  EXPECT_CALL(*scheduler, heartbeat(_))
+.WillRepeatedly(Return()); // Ignore heartbeats.
+
+  Future offers;
+  EXPECT_CALL(*scheduler, offers(_, _))
+.WillOnce(FutureArg<1>())
+.WillRepeatedly(Return()); // Ignore subsequent offers.
+
+  mesos.send(v1::createCallSubscribe(v1::DEFAULT_FRAMEWORK_INFO));
+
+  AWAIT_READY(subscribed);
+
+  v1::FrameworkID frameworkId(subscribed->framework_id());
+
+  // Update `executorInfo` with the subscribed `frameworkId`.
+  executorInfo.mutable_framework_id()->CopyFrom(frameworkId);
+
+  AWAIT_READY(offers);
+  ASSERT_FALSE(offers->offers().empty());
+
+  const v1::Offer& offer = offers->offers(0);
+  const v1::AgentID& agentId = offer.agent_id();
+
+  v1::TaskInfo task1 = v1::createTask(agentId, resources, "sleep 1000");
+  v1::TaskInfo task2 = v1::createTask(agentId, resources, "sleep 1000");
+
+  v1::TaskGroupInfo taskGroup;
+  taskGroup.add_tasks()->CopyFrom(task1);
+  taskGroup.add_tasks()->CopyFrom(task2);
+
+  v1::Offer::Operation launchGroup = v1::LAUNCH_GROUP(executorInfo, taskGroup);
+
+  // Saved arguments from `Slave::_run()`.
+  Future _unschedules;
+  FrameworkInfo _frameworkInfo;
+  ExecutorInfo _executorInfo;
+  Option _taskGroup;
+  Option _task;
+  vector _resourceVersionUuids;
+  Option _launchExecutor;
+
+  // Capture `_run` arguments.
+  Future _run;
+  EXPECT_CALL(*slave.get()->mock(), _run(_, _, _, _, _, _, _))
+.WillOnce(DoAll(FutureSatisfy(&_run),
+  SaveArg<0>(&_unschedules),
+  SaveArg<1>(&_frameworkInfo),
+  SaveArg<2>(&_executorInfo),
+  SaveArg<3>(&_task),
+  SaveArg<4>(&_taskGroup),
+  SaveArg<5>(&_resourceVersionUuids),
+  SaveArg<6>(&_launchExecutor)));
+
+  Future exitedExecutorMessage =
+FUTURE_PROTOBUF(ExitedExecutorMessage(), _, _);
+
+  mesos.send(v1::createCallAccept(frameworkId, offer, {launchGroup}));
+
+  AWAIT_READY(_run);
+
+  // Induce a failed GC unschedule.
+  Promise promise;
+  Future failedFuture = promise.future();
+  promise.fail("");
+
+  process::dispatch(slave.get()->pid, [&] {
+slave.get()->mock()->unmocked__run(
+failedFuture,
+_frameworkInfo,
+

[1/8] mesos git commit: Added new protobuf field `launch_executor` in RunTask(Group)Message.

2018-02-14 Thread grag
Repository: mesos
Updated Branches:
  refs/heads/master 0b94805f6 -> 103d6e06a


Added new protobuf field `launch_executor` in RunTask(Group)Message.

This boolean flag is used for the master to specify whether a
new executor should be launched for the task or task group (with
the exception of the command executor). This allows the master
to control executor creation on the agent.

Also updated the relevant message handlers and mock functions.

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


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

Branch: refs/heads/master
Commit: 7c29031bf35232a9e8b0c88c826d0185673a
Parents: 0b94805
Author: Meng Zhu 
Authored: Tue Feb 13 22:44:48 2018 -0800
Committer: Greg Mann 
Committed: Wed Feb 14 02:28:10 2018 -0800

--
 src/messages/messages.proto | 22 ++
 src/slave/slave.cpp | 50 +---
 src/slave/slave.hpp | 18 +--
 src/tests/mock_slave.cpp| 16 -
 src/tests/mock_slave.hpp| 16 -
 src/tests/slave_tests.cpp   |  6 ++---
 6 files changed, 93 insertions(+), 35 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/7c29031b/src/messages/messages.proto
--
diff --git a/src/messages/messages.proto b/src/messages/messages.proto
index 0db44a2..556801d 100644
--- a/src/messages/messages.proto
+++ b/src/messages/messages.proto
@@ -293,8 +293,6 @@ message ReviveOffersMessage {
 
 
 /**
- * Depending on the `TaskInfo`, this message either notifies an existing
- * executor to run the task, or starts a new executor and runs the task.
  * This message is sent when scheduler::Call::Accept is sent with
  * Offer::Operation::Launch.
  *
@@ -326,13 +324,19 @@ message RunTaskMessage {
   // forward executor messages through the master. For schedulers
   // still using the driver, this will remain set.
   optional string pid = 3;
+
+  // If this field is absent (as prior to 1.5), depending on the `TaskInfo`,
+  // this message either notifies an existing executor to run the task, or
+  // starts a new executor and runs the task.
+  //
+  // Starting 1.5, this field will always be set. Agent should only launch
+  // an executor if this field value is true.
+  optional bool launch_executor = 6;
 }
 
 
 /**
- * This message either notifies an existing executor to run a task
- * group, or starts a new executor and runs the task group. This
- * message is sent when scheduler::Call::Accept is sent with
+ * This message is sent when scheduler::Call::Accept is sent with
  * Offer::Operation::LaunchGroup.
  *
  * See executor::Event::LaunchGroup.
@@ -354,6 +358,14 @@ message RunTaskGroupMessage {
   // because this means the operation is operating on resources that
   // might have already been invalidated.
   repeated ResourceVersionUUID resource_version_uuids = 4;
+
+  // If this field is absent (as prior to 1.5), depending on the `TaskInfo`,
+  // this message either notifies an existing executor to run the task, or
+  // starts a new executor and runs the task.
+  //
+  // Starting 1.5, this field will always be set. Agent should only launch
+  // an executor if this field value is true.
+  optional bool launch_executor = 5;
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/7c29031b/src/slave/slave.cpp
--
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index df8b33d..893a196 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -672,19 +672,10 @@ void Slave::initialize()
   ::connection);
 
   install(
-  ::runTask,
-  ::framework,
-  ::framework_id,
-  ::pid,
-  ::task,
-  ::resource_version_uuids);
+  ::handleRunTaskMessage);
 
   install(
-  ::runTaskGroup,
-  ::framework,
-  ::executor,
-  ::task_group,
-  ::resource_version_uuids);
+  ::handleRunTaskGroupMessage);
 
   install(
   ::killTask);
@@ -1900,6 +1891,22 @@ void Slave::doReliableRegistration(Duration maxBackoff)
 }
 
 
+void Slave::handleRunTaskMessage(
+const UPID& from,
+RunTaskMessage&& runTaskMessage)
+{
+  runTask(
+  from,
+  runTaskMessage.framework(),
+  runTaskMessage.framework_id(),
+  runTaskMessage.pid(),
+  runTaskMessage.task(),
+  google::protobuf::convert(runTaskMessage.resource_version_uuids()),
+  runTaskMessage.has_launch_executor() ?
+  Option(runTaskMessage.launch_executor()) : None());
+}
+
+
 // TODO(vinod): Instead of crashing the slave on checkpoint 

[2/8] mesos git commit: Made master set `launch_executor` in the RunTask(Group)Message.

2018-02-14 Thread grag
Made master set `launch_executor` in the RunTask(Group)Message.

By setting a new field `launch_executor` in the RunTask(Group)Message,
the master is able to control executor creation on the agent.

Also refactored the `addTask()` logic. Added two new functions:
`isTaskLaunchExecutor()` checks if a task needs to launch an executor;
`addExecutor()` adds an executor to the framework and slave.

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


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

Branch: refs/heads/master
Commit: ce7f1f6a0807b96b92cb4c755c52f36e1a8e2853
Parents: 7c29031
Author: Meng Zhu 
Authored: Tue Feb 13 22:44:58 2018 -0800
Committer: Greg Mann 
Committed: Wed Feb 14 02:29:38 2018 -0800

--
 src/master/master.cpp | 112 +++--
 src/master/master.hpp |  19 ++--
 2 files changed, 92 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/ce7f1f6a/src/master/master.cpp
--
diff --git a/src/master/master.cpp b/src/master/master.cpp
index d7d2286..b06d7a6 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -3830,44 +3830,56 @@ Future Master::authorizeSlave(
 }
 
 
-Resources Master::addTask(
-const TaskInfo& task,
+bool Master::isLaunchExecutor(
+const ExecutorID& executorId,
 Framework* framework,
-Slave* slave)
+Slave* slave) const
 {
   CHECK_NOTNULL(framework);
   CHECK_NOTNULL(slave);
-  CHECK(slave->connected) << "Adding task " << task.task_id()
-  << " to disconnected agent " << *slave;
 
-  // The resources consumed.
-  Resources resources = task.resources();
+  if (!slave->hasExecutor(framework->id(), executorId)) {
+CHECK(!framework->hasExecutor(slave->id, executorId))
+  << "Executor '" << executorId
+  << "' known to the framework " << *framework
+  << " but unknown to the agent " << *slave;
+return true;
+  }
+
+  return false;
+}
+
 
-  // Determine if this task launches an executor, and if so make sure
-  // the slave and framework state has been updated accordingly.
+void Master::addExecutor(
+const ExecutorInfo& executorInfo,
+Framework* framework,
+Slave* slave)
+{
+  CHECK_NOTNULL(framework);
+  CHECK_NOTNULL(slave);
+  CHECK(slave->connected) << "Adding executor " << executorInfo.executor_id()
+  << " to disconnected agent " << *slave;
 
-  if (task.has_executor()) {
-// TODO(benh): Refactor this code into Slave::addTask.
-if (!slave->hasExecutor(framework->id(), task.executor().executor_id())) {
-  CHECK(!framework->hasExecutor(slave->id, task.executor().executor_id()))
-<< "Executor '" << task.executor().executor_id()
-<< "' known to the framework " << *framework
-<< " but unknown to the agent " << *slave;
+  slave->addExecutor(framework->id(), executorInfo);
+  framework->addExecutor(slave->id, executorInfo);
+}
 
-  slave->addExecutor(framework->id(), task.executor());
-  framework->addExecutor(slave->id, task.executor());
 
-  resources += task.executor().resources();
-}
-  }
+void Master::addTask(
+const TaskInfo& task,
+Framework* framework,
+Slave* slave)
+{
+  CHECK_NOTNULL(framework);
+  CHECK_NOTNULL(slave);
+  CHECK(slave->connected) << "Adding task " << task.task_id()
+  << " to disconnected agent " << *slave;
 
   // Add the task to the framework and slave.
   Task* t = new Task(protobuf::createTask(task, TASK_STAGING, 
framework->id()));
 
   slave->addTask(t);
   framework->addTask(t);
-
-  return resources;
 }
 
 
@@ -4900,7 +4912,23 @@ void Master::_accept(
 
   // Add task.
   if (pending) {
-const Resources consumed = addTask(task, framework, slave);
+Resources consumed;
+
+bool launchExecutor = true;
+if (task.has_executor()) {
+  launchExecutor = isLaunchExecutor(
+  task.executor().executor_id(), framework, slave);
+
+  // Master tracks the new executor only if the task is not a
+  // command task.
+  if (launchExecutor) {
+addExecutor(task.executor(), framework, slave);
+consumed += task.executor().resources();
+  }
+}
+
+addTask(task, framework, slave);
+consumed += task.resources();
 
 CHECK(available.contains(consumed))
   << available << " does not contain " << consumed;
@@ -4942,6 +4970,8 @@ void 

[4/8] mesos git commit: Fixed a bug where executor info lingers on master if failed to launch.

2018-02-14 Thread grag
Fixed a bug where executor info lingers on master if failed to launch.

Master relies on `ExitedExecutorMessage` from the agent to remove
executor entries. However, this message won't be sent if an executor
never actually launched (due to transient error), leaving executor
info on the master and the executor's resources claimed.
See MESOS-1720.

This patch fixes this issue by sending the `ExitedExecutorMessage`
from the agent if the executor is never launched.

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


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

Branch: refs/heads/master
Commit: b5350fecc8604bdddb45303d9363aff4ca60cfcc
Parents: 0321b85
Author: Meng Zhu 
Authored: Tue Feb 13 22:45:07 2018 -0800
Committer: Greg Mann 
Committed: Wed Feb 14 02:31:28 2018 -0800

--
 src/slave/slave.cpp   | 276 +
 src/slave/slave.hpp   |  10 +-
 src/tests/mock_slave.cpp  |   8 +-
 src/tests/mock_slave.hpp  |   8 +-
 src/tests/slave_tests.cpp |  35 --
 5 files changed, 292 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/b5350fec/src/slave/slave.cpp
--
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index f96c97e..c5ec62c 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -1937,7 +1937,13 @@ void Slave::runTask(
 
   const ExecutorInfo executorInfo = getExecutorInfo(frameworkInfo, task);
 
-  run(frameworkInfo, executorInfo, task, None(), resourceVersionUuids, pid);
+  run(frameworkInfo,
+  executorInfo,
+  task,
+  None(),
+  resourceVersionUuids,
+  pid,
+  launchExecutor);
 }
 
 
@@ -1947,7 +1953,8 @@ void Slave::run(
 Option task,
 Option taskGroup,
 const vector& resourceVersionUuids,
-const UPID& pid)
+const UPID& pid,
+const Option& launchExecutor)
 {
   CHECK_NE(task.isSome(), taskGroup.isSome())
 << "Either task or task group should be set but not both";
@@ -2032,6 +2039,10 @@ void Slave::run(
 LOG(WARNING) << "Ignoring running " << taskOrTaskGroup(task, taskGroup)
  << " because the agent is " << state;
 
+// We do not send `ExitedExecutorMessage` here because the disconnected
+// agent is expected to (eventually) reregister and reconcile the executor
+// states with the master.
+
 // TODO(vinod): Consider sending a TASK_LOST here.
 // Currently it is tricky because 'statusUpdate()'
 // ignores updates for unknown frameworks.
@@ -2152,7 +2163,8 @@ void Slave::run(
  executorInfo,
  task,
  taskGroup,
- resourceVersionUuids));
+ resourceVersionUuids,
+ launchExecutor));
 }
 
 
@@ -2162,7 +2174,8 @@ void Slave::_run(
 const ExecutorInfo& executorInfo,
 const Option& task,
 const Option& taskGroup,
-const std::vector& resourceVersionUuids)
+const std::vector& resourceVersionUuids,
+const Option& launchExecutor)
 {
   // TODO(anindya_sinha): Consider refactoring the initial steps common
   // to `_run()` and `__run()`.
@@ -2184,6 +2197,14 @@ void Slave::_run(
 LOG(WARNING) << "Ignoring running " << taskOrTaskGroup(task, taskGroup)
  << " because the framework " << frameworkId
  << " does not exist";
+
+if (launchExecutor.isSome() && launchExecutor.get()) {
+  // Master expects new executor to be launched for this task(s) launch.
+  // To keep the master executor entries updated, the agent needs to send
+  // 'ExitedExecutorMessage' even though no executor launched.
+  sendExitedExecutorMessage(frameworkId, executorInfo.executor_id());
+}
+
 return;
   }
 
@@ -2204,6 +2225,13 @@ void Slave::_run(
   removeFramework(framework);
 }
 
+if (launchExecutor.isSome() && launchExecutor.get()) {
+  // Master expects new executor to be launched for this task(s) launch.
+  // To keep the master executor entries updated, the agent needs to send
+  // 'ExitedExecutorMessage' even though no executor launched.
+  sendExitedExecutorMessage(frameworkId, executorInfo.executor_id());
+}
+
 return;
   }
 
@@ -2228,6 +2256,14 @@ void Slave::_run(
 LOG(WARNING) << "Ignoring running " << taskOrTaskGroup(task, taskGroup)
  << " of framework " << frameworkId
  << " because it has been killed in the meantime";
+
+if (launchExecutor.isSome() && launchExecutor.get()) {
+  // Master expects new executor to be launched for this task(s) 

mesos-site git commit: Updated the website built from mesos SHA: 0b94805.

2018-02-14 Thread git-site-role
Repository: mesos-site
Updated Branches:
  refs/heads/asf-site 3fa993dd4 -> b41fc7fa1


Updated the website built from mesos SHA: 0b94805.


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

Branch: refs/heads/asf-site
Commit: b41fc7fa1a09fff831b9189c569354cc64340fae
Parents: 3fa993d
Author: jenkins 
Authored: Wed Feb 14 09:49:22 2018 +
Committer: jenkins 
Committed: Wed Feb 14 09:49:22 2018 +

--
 content/blog/feed.xml | 2 +-
 content/blog/performance-working-group-progress-report/index.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/b41fc7fa/content/blog/feed.xml
--
diff --git a/content/blog/feed.xml b/content/blog/feed.xml
index bea452a..ae45149 100644
--- a/content/blog/feed.xml
+++ b/content/blog/feed.xml
@@ -295,7 +295,7 @@ To learn more about CSI work in Mesos, you can dig into the 
design document 
 /ul
 
 
-pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#109;#x61;#x69;#108;#x74;#111;#58;#100;#101;#118;#x40;#97;#x70;#97;#x63;#104;#101;#x2e;#x6d;#101;#x73;#111;#115;#46;#x6f;#114;#x67;#100;#x65;#x76;#64;#x61;#x70;#x61;#99;#104;#x65;#46;#x6d;#x65;#115;#111;#115;#46;#111;#x72;#103;/a./p
+pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#x6d;#97;#105;#x6c;#x74;#x6f;#58;#x64;#x65;#118;#x40;#97;#x70;#x61;#x63;#x68;#x65;#x2e;#x6d;#x65;#x73;#111;#115;#x2e;#x6f;#x72;#x67;#100;#101;#118;#x40;#x61;#x70;#x61;#99;#104;#101;#46;#x6d;#x65;#x73;#111;#x73;#46;#111;#x72;#x67;/a./p
 

   

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/b41fc7fa/content/blog/performance-working-group-progress-report/index.html
--
diff --git a/content/blog/performance-working-group-progress-report/index.html 
b/content/blog/performance-working-group-progress-report/index.html
index aae4e04..a6b608d 100644
--- a/content/blog/performance-working-group-progress-report/index.html
+++ b/content/blog/performance-working-group-progress-report/index.html
@@ -248,7 +248,7 @@
 
 
 
-If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
+If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
 
   
 



mesos-site git commit: Updated the website built from mesos SHA: 0b94805.

2018-02-14 Thread git-site-role
Repository: mesos-site
Updated Branches:
  refs/heads/asf-site df0fa690a -> 3fa993dd4


Updated the website built from mesos SHA: 0b94805.


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

Branch: refs/heads/asf-site
Commit: 3fa993dd4e1f7e65961863c901e9a930d2b55971
Parents: df0fa69
Author: jenkins 
Authored: Wed Feb 14 09:21:06 2018 +
Committer: jenkins 
Committed: Wed Feb 14 09:21:06 2018 +

--
 content/blog/feed.xml | 2 +-
 content/blog/performance-working-group-progress-report/index.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/3fa993dd/content/blog/feed.xml
--
diff --git a/content/blog/feed.xml b/content/blog/feed.xml
index ad79933..bea452a 100644
--- a/content/blog/feed.xml
+++ b/content/blog/feed.xml
@@ -295,7 +295,7 @@ To learn more about CSI work in Mesos, you can dig into the 
design document 
 /ul
 
 
-pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#109;#97;#105;#x6c;#116;#x6f;#x3a;#x64;#x65;#118;#x40;#x61;#112;#97;#99;#x68;#101;#46;#109;#101;#x73;#x6f;#115;#46;#x6f;#114;#x67;#x64;#x65;#x76;#64;#x61;#112;#97;#99;#104;#x65;#46;#x6d;#x65;#115;#111;#115;#46;#111;#x72;#x67;/a./p
+pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#109;#x61;#x69;#108;#x74;#111;#58;#100;#101;#118;#x40;#97;#x70;#97;#x63;#104;#101;#x2e;#x6d;#101;#x73;#111;#115;#46;#x6f;#114;#x67;#100;#x65;#x76;#64;#x61;#x70;#x61;#99;#104;#x65;#46;#x6d;#x65;#115;#111;#115;#46;#111;#x72;#103;/a./p
 

   

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/3fa993dd/content/blog/performance-working-group-progress-report/index.html
--
diff --git a/content/blog/performance-working-group-progress-report/index.html 
b/content/blog/performance-working-group-progress-report/index.html
index 667ec86..aae4e04 100644
--- a/content/blog/performance-working-group-progress-report/index.html
+++ b/content/blog/performance-working-group-progress-report/index.html
@@ -248,7 +248,7 @@
 
 
 
-If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
+If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
 
   
 



[2/3] mesos-site git commit: Updated the website built from mesos SHA: 636330c.

2018-02-14 Thread git-site-role
http://git-wip-us.apache.org/repos/asf/mesos-site/blob/df0fa690/content/api/latest/c++/slave_8hpp_source.html
--
diff --git a/content/api/latest/c++/slave_8hpp_source.html 
b/content/api/latest/c++/slave_8hpp_source.html
index fa39779..98c62e5 100644
--- a/content/api/latest/c++/slave_8hpp_source.html
+++ b/content/api/latest/c++/slave_8hpp_source.html
@@ -474,756 +474,772 @@
   
420
   421 
 Nothing detachFile(const std::string path);
   
422
-  423 
 // TODO(qianzhang): This is a workaround to make the 
default executor
-  424 
 // tasks volume directory visible in MESOS UI. In 
MESOS-7225, we made
-  425 
 // sure a task can access any volumes specified in its 
disk resources
-  426 
 // from its sandbox by introducing a workaround to the 
default executor,
-  427 
 // i.e., adding a `SANDBOX_PATH` volume with type 
`PARENT` to the
-  428 
 // corresponding nested container. This volume gets 
translated into a
-  429 
 // bind mount in the nested containers mount 
namespace, which is is not
-  430 
 // visible in Mesos UI because it operates in the host 
namespace. See
-  431 
 // Mesos-8279 for details.
-  432 
 //
-  433 
 // To make the tasks volume directory visible in 
Mesos UI, here we
-  434 
 // attach the executors volume directory to it, so 
when users browse
-  435 
 // tasks volume directory in Mesos UI, what they 
actually browse is the
-  436 
 // executors volume directory. Note when calling 
`Files::attach()`, the
-  437 
 // third argument `authorized` is not specified because 
it is already
-  438 
 // specified when we do the attach for the 
executors sandbox and it also
-  439 
 // applies to the executors tasks.
-  440 
 void attachTaskVolumeDirectory(
-  441 
 const ExecutorInfo executorInfo,
-  442 
 const ContainerID 
executorContainerId,
-  443 
 const Task task);
-  
444
-  445 
 // TODO(qianzhang): Remove the tasks volume 
directory from the /files
-  446 
 // endpoint. This is a workaround for 
MESOS-8279.
-  447 
 void detachTaskVolumeDirectories(
-  448 
 const ExecutorInfo executorInfo,
-  449 
 const ContainerID 
executorContainerId,
-  450 
 const std::vectorTask 
tasks);
-  
451
-  452 
 // Triggers a re-detection of the master when the slave 
does
-  453 
 // not receive a ping.
-  454 
 void pingTimeout(process::FutureOptionMasterInfo 
future);
-  
455
-  456 
 void authenticate();
-  
457
-  458 
 // Helper routines to lookup a 
framework/executor.
-  459 
 Framework* getFramework(const FrameworkID frameworkId) const;
+  423 
 // TODO(qianzhang): This is a workaround to make the 
default executor tasks
+  424 
 // volume directory visible in MESOS UI. It handles two 
cases:
+  425 
 //   1. The task has disk resources specified. In this 
case any disk resources
+  426 
 //  specified for the task are mounted on the top 
level container since
+  427 
 //  currently all resources of nested containers are 
merged in the top
+  428 
 //  level executor container. To make sure the task 
can access any volumes
+  429 
 //  specified in its disk resources from its 
sandbox, a workaround was
+  430 
 //  introduced to the default executor in 
MESOS-7225, i.e., adding a
+  431 
 //  `SANDBOX_PATH` volume with type `PARENT` to the 
corresponding nested
+  432 
 //  container. This volume gets translated into a 
bind mount in the nested
+  433 
 //  containers mount namespace, which is not 
visible in Mesos UI because
+  434 
 //  it operates in the host namespace. See 
MESOS-8279 for details.
+  435 
 //   2. The executor has disk resources specified and 
the tasks ContainerInfo
+  436 
 //  has a `SANDBOX_PATH` volume with type `PARENT` 
specified to share the
+  437 
 //  executors disk volume. Similar to the first 
case, this `SANDBOX_PATH`
+  438 
 //  volume gets translated into a bind mount which 
is not visible in Mesos
+  439 
 //  UI. See MESOS-8565 for details.
+  440 
 //
+  441 
 // To make the tasks volume directory visible in 
Mesos UI, here we attach the
+  442 
 // executors volume directory to it so that it can 
be accessed via the /files
+  443 
 // endpoint. So when users browse tasks volume 
directory in Mesos UI, what
+  444 
 // they actually browse is the executors volume 
directory. Note when calling
+  445 
 // `Files::attach()`, the third argument `authorized` is 
not specified because
+  446 
 // it is already specified when we do the attach for the 
executors sandbox
+  447 
 // and it also applies to the executors tasks. Note 
that for the second case
+  448 
 // we can not do the attach when the tasks 
ContainerInfo has a `SANDBOX_PATH`
+  449 
 // volume with type `PARENT` but the executor has NO 
disk resources, because
+  450 
 // in such case the attach will fail due to the 
executors volume directory
+  451 
 // not existing which will actually be created by the 
`volume/sandbox_path`
+  452 
 // 

[3/3] mesos-site git commit: Updated the website built from mesos SHA: 636330c.

2018-02-14 Thread git-site-role
Updated the website built from mesos SHA: 636330c.


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

Branch: refs/heads/asf-site
Commit: df0fa690ad48e8193bca96f0439bbfb9bf200fd1
Parents: 049098b
Author: jenkins 
Authored: Wed Feb 14 08:51:48 2018 +
Committer: jenkins 
Committed: Wed Feb 14 08:51:48 2018 +

--
 .../api/latest/c++/mock__slave_8hpp_source.html |4 +-
 content/api/latest/c++/slave_8hpp_source.html   | 1536 +-
 content/blog/feed.xml   |2 +-
 .../index.html  |2 +-
 4 files changed, 780 insertions(+), 764 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/df0fa690/content/api/latest/c++/mock__slave_8hpp_source.html
--
diff --git a/content/api/latest/c++/mock__slave_8hpp_source.html 
b/content/api/latest/c++/mock__slave_8hpp_source.html
index e117673..bd48ef0 100644
--- a/content/api/latest/c++/mock__slave_8hpp_source.html
+++ b/content/api/latest/c++/mock__slave_8hpp_source.html
@@ -357,9 +357,9 @@
 mesos::internal::tests::MockSlave::unmocked_shutdownExecutorvoid unmocked_shutdownExecutor(const process::UPID from, 
const FrameworkID frameworkId, const ExecutorID 
executorId)
 mesos::slave::QoSControllerDefinition: qos_controller.hpp:44
 mesos::internal::tests::MockSlave::unmocked_qosCorrectionsvoid unmocked_qosCorrections()
-mesos::internal::slave::ExecutorDefinition: slave.hpp:837
+mesos::internal::slave::ExecutorDefinition: slave.hpp:853
 mesos::internal::slave::Slave::_qosCorrectionsvirtual void _qosCorrections(const process::Future 
std::list mesos::slave::QoSCorrection  correction)
-mesos::internal::slave::FrameworkDefinition: slave.hpp:1014
+mesos::internal::slave::FrameworkDefinition: slave.hpp:1030
 messages.hpp
 process::FutureDefinition: future.hpp:57
 



[1/3] mesos-site git commit: Updated the website built from mesos SHA: 636330c.

2018-02-14 Thread git-site-role
Repository: mesos-site
Updated Branches:
  refs/heads/asf-site 049098b13 -> df0fa690a


http://git-wip-us.apache.org/repos/asf/mesos-site/blob/df0fa690/content/blog/feed.xml
--
diff --git a/content/blog/feed.xml b/content/blog/feed.xml
index 59d4574..ad79933 100644
--- a/content/blog/feed.xml
+++ b/content/blog/feed.xml
@@ -295,7 +295,7 @@ To learn more about CSI work in Mesos, you can dig into the 
design document 
 /ul
 
 
-pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#109;#97;#x69;#x6c;#x74;#x6f;#x3a;#100;#101;#118;#64;#x61;#x70;#97;#x63;#x68;#101;#46;#109;#101;#115;#111;#x73;#46;#111;#x72;#103;#100;#101;#118;#x40;#97;#112;#97;#99;#104;#x65;#x2e;#109;#101;#115;#111;#x73;#x2e;#111;#x72;#103;/a./p
+pIf you are a user and would like to suggest some areas for 
performance improvement, please let us know by emailing a 
href=#109;#97;#105;#x6c;#116;#x6f;#x3a;#x64;#x65;#118;#x40;#x61;#112;#97;#99;#x68;#101;#46;#109;#101;#x73;#x6f;#115;#46;#x6f;#114;#x67;#x64;#x65;#x76;#64;#x61;#112;#97;#99;#104;#x65;#46;#x6d;#x65;#115;#111;#115;#46;#111;#x72;#x67;/a./p
 

   

http://git-wip-us.apache.org/repos/asf/mesos-site/blob/df0fa690/content/blog/performance-working-group-progress-report/index.html
--
diff --git a/content/blog/performance-working-group-progress-report/index.html 
b/content/blog/performance-working-group-progress-report/index.html
index 5b91130..667ec86 100644
--- a/content/blog/performance-working-group-progress-report/index.html
+++ b/content/blog/performance-working-group-progress-report/index.html
@@ -248,7 +248,7 @@
 
 
 
-If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
+If you are a user and would like to suggest some areas for performance 
improvement, please let us know by emailing .
 
   
 



[2/4] mesos git commit: Attached/detached volume directory for task which has volume specified.

2018-02-14 Thread gilbert
Attached/detached volume directory for task which has volume specified.

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


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

Branch: refs/heads/1.5.x
Commit: 345a9621f1021834d067ee591fb54b53753621c3
Parents: 8ae1e89
Author: Qian Zhang 
Authored: Wed Feb 14 00:17:37 2018 -0800
Committer: Gilbert Song 
Committed: Wed Feb 14 00:33:51 2018 -0800

--
 src/slave/slave.cpp | 144 ---
 src/slave/slave.hpp |  50 ++--
 2 files changed, 168 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/345a9621/src/slave/slave.cpp
--
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 065b255..151c5eb 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -1031,6 +1031,7 @@ void Slave::attachTaskVolumeDirectory(
 
   CHECK_EQ(task.executor_id(), executorInfo.executor_id());
 
+  // This is the case that the task has disk resources specified.
   foreach (const Resource& resource, task.resources()) {
 // Ignore if there are no disk resources or if the
 // disk resources did not specify a volume mapping.
@@ -1040,15 +1041,15 @@ void Slave::attachTaskVolumeDirectory(
 
 const Volume& volume = resource.disk().volume();
 
-const string executorDirectory = paths::getExecutorRunPath(
+const string executorRunPath = paths::getExecutorRunPath(
 flags.work_dir,
 info.id(),
 task.framework_id(),
 task.executor_id(),
 executorContainerId);
 
-const string executorVolumePath =
-  path::join(executorDirectory, volume.container_path());
+const string executorDirectoryPath =
+  path::join(executorRunPath, volume.container_path());
 
 const string taskPath = paths::getTaskPath(
 flags.work_dir,
@@ -1058,16 +1059,86 @@ void Slave::attachTaskVolumeDirectory(
 executorContainerId,
 task.task_id());
 
-const string taskVolumePath =
+const string taskDirectoryPath =
   path::join(taskPath, volume.container_path());
 
-files->attach(executorVolumePath, taskVolumePath)
+files->attach(executorDirectoryPath, taskDirectoryPath)
   .onAny(defer(
   self(),
   ::fileAttached,
   lambda::_1,
-  executorVolumePath,
-  taskVolumePath));
+  executorDirectoryPath,
+  taskDirectoryPath));
+  }
+
+  // This is the case that the executor has disk resources specified
+  // and the task's ContainerInfo has a `SANDBOX_PATH` volume with type
+  // `PARENT` to share the executor's disk volume.
+  hashset executorContainerPaths;
+  foreach (const Resource& resource, executorInfo.resources()) {
+// Ignore if there are no disk resources or if the
+// disk resources did not specify a volume mapping.
+if (!resource.has_disk() || !resource.disk().has_volume()) {
+  continue;
+}
+
+const Volume& volume = resource.disk().volume();
+executorContainerPaths.insert(volume.container_path());
+  }
+
+  if (executorContainerPaths.empty()) {
+return;
+  }
+
+  if (task.has_container()) {
+foreach (const Volume& volume, task.container().volumes()) {
+  if (!volume.has_source() ||
+  volume.source().type() != Volume::Source::SANDBOX_PATH) {
+continue;
+  }
+
+  CHECK(volume.source().has_sandbox_path());
+
+  const Volume::Source::SandboxPath& sandboxPath =
+volume.source().sandbox_path();
+
+  if (sandboxPath.type() != Volume::Source::SandboxPath::PARENT) {
+continue;
+  }
+
+  if (!executorContainerPaths.contains(sandboxPath.path())) {
+continue;
+  }
+
+  const string executorRunPath = paths::getExecutorRunPath(
+  flags.work_dir,
+  info.id(),
+  task.framework_id(),
+  task.executor_id(),
+  executorContainerId);
+
+  const string executorDirectoryPath =
+path::join(executorRunPath, sandboxPath.path());
+
+  const string taskPath = paths::getTaskPath(
+  flags.work_dir,
+  info.id(),
+  task.framework_id(),
+  task.executor_id(),
+  executorContainerId,
+  task.task_id());
+
+  const string taskDirectoryPath =
+path::join(taskPath, volume.container_path());
+
+  files->attach(executorDirectoryPath, taskDirectoryPath)
+.onAny(defer(
+self(),
+::fileAttached,
+lambda::_1,
+executorDirectoryPath,
+

[1/4] mesos git commit: Revert "Added MESOS-8577 to the 1.5.1 CHANGELOG."

2018-02-14 Thread gilbert
Repository: mesos
Updated Branches:
  refs/heads/1.5.x 3b48fd607 -> 13deae3ec


Revert "Added MESOS-8577 to the 1.5.1 CHANGELOG."

This reverts commit f6010e86faa03a155bd073578ea2b5484d8d4aaf.


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

Branch: refs/heads/1.5.x
Commit: 8ae1e89a0993bfdce25b0252240d0daccf3104fa
Parents: 3b48fd6
Author: Gilbert Song 
Authored: Wed Feb 14 00:33:39 2018 -0800
Committer: Gilbert Song 
Committed: Wed Feb 14 00:33:39 2018 -0800

--
 CHANGELOG | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/8ae1e89a/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 2e682be..db1f827 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -8,7 +8,6 @@ Release Notes - Mesos - Version 1.5.1 (WIP)
  * [MESOS-8411] - Killing a queued task can lead to the command executor never 
terminating.
  * [MESOS-8510] - URI disk profile adaptor does not consider plugin type for a 
profile.
  * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
- * [MESOS-8577] - Destroy nested container if 
`LAUNCH_NESTED_CONTAINER_SESSION` fails.
 
 
 Release Notes - Mesos - Version 1.5.0



[4/4] mesos git commit: Added MESOS-8565 to 1.5.1 CHANGELOG.

2018-02-14 Thread gilbert
Added MESOS-8565 to 1.5.1 CHANGELOG.


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

Branch: refs/heads/1.5.x
Commit: b9d1fe3d1c913b3aec6ef7591bb4d8171090d7fb
Parents: 345a962
Author: Gilbert Song 
Authored: Wed Feb 14 00:25:49 2018 -0800
Committer: Gilbert Song 
Committed: Wed Feb 14 00:33:51 2018 -0800

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/b9d1fe3d/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index db1f827..70ff3bd 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -8,6 +8,7 @@ Release Notes - Mesos - Version 1.5.1 (WIP)
  * [MESOS-8411] - Killing a queued task can lead to the command executor never 
terminating.
  * [MESOS-8510] - URI disk profile adaptor does not consider plugin type for a 
profile.
  * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
+ * [MESOS-8565] - Persistent volumes are not visible in Mesos UI when 
launching a pod using default executor.
 
 
 Release Notes - Mesos - Version 1.5.0



[3/4] mesos git commit: Added MESOS-8577 to the 1.5.1 CHANGELOG.

2018-02-14 Thread gilbert
Added MESOS-8577 to the 1.5.1 CHANGELOG.


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

Branch: refs/heads/1.5.x
Commit: 13deae3ec34abe63265f33b03c984af54c1f05bf
Parents: b9d1fe3
Author: Gilbert Song 
Authored: Wed Feb 14 00:32:39 2018 -0800
Committer: Gilbert Song 
Committed: Wed Feb 14 00:33:51 2018 -0800

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/13deae3e/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 70ff3bd..adf0200 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,6 +9,7 @@ Release Notes - Mesos - Version 1.5.1 (WIP)
  * [MESOS-8510] - URI disk profile adaptor does not consider plugin type for a 
profile.
  * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
  * [MESOS-8565] - Persistent volumes are not visible in Mesos UI when 
launching a pod using default executor.
+ * [MESOS-8577] - Destroy nested container if 
`LAUNCH_NESTED_CONTAINER_SESSION` fails.
 
 
 Release Notes - Mesos - Version 1.5.0



mesos git commit: Added MESOS-8577 to the 1.5.1 CHANGELOG.

2018-02-14 Thread gilbert
Repository: mesos
Updated Branches:
  refs/heads/master 636330c7b -> 0b94805f6


Added MESOS-8577 to the 1.5.1 CHANGELOG.


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

Branch: refs/heads/master
Commit: 0b94805f67f11a2087402acf432693c91b4a4429
Parents: 636330c
Author: Gilbert Song 
Authored: Wed Feb 14 00:32:39 2018 -0800
Committer: Gilbert Song 
Committed: Wed Feb 14 00:32:39 2018 -0800

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/0b94805f/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index 03de43e..091cff6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -9,6 +9,7 @@ Release Notes - Mesos - Version 1.5.1 (WIP)
  * [MESOS-8510] - URI disk profile adaptor does not consider plugin type for a 
profile.
  * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
  * [MESOS-8565] - Persistent volumes are not visible in Mesos UI when 
launching a pod using default executor.
+ * [MESOS-8577] - Destroy nested container if 
`LAUNCH_NESTED_CONTAINER_SESSION` fails.
 
 
 Release Notes - Mesos - Version 1.5.0



[2/2] mesos git commit: Added MESOS-8565 to 1.5.1 CHANGELOG.

2018-02-14 Thread gilbert
Added MESOS-8565 to 1.5.1 CHANGELOG.


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

Branch: refs/heads/master
Commit: 636330c7bdf5f6d2809dd82caad73b7e5f0e4570
Parents: 9d4c6d9
Author: Gilbert Song 
Authored: Wed Feb 14 00:25:49 2018 -0800
Committer: Gilbert Song 
Committed: Wed Feb 14 00:25:49 2018 -0800

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/636330c7/CHANGELOG
--
diff --git a/CHANGELOG b/CHANGELOG
index f7bb3d5..03de43e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -8,6 +8,7 @@ Release Notes - Mesos - Version 1.5.1 (WIP)
  * [MESOS-8411] - Killing a queued task can lead to the command executor never 
terminating.
  * [MESOS-8510] - URI disk profile adaptor does not consider plugin type for a 
profile.
  * [MESOS-8552] - CGROUPS_ROOT_PidNamespaceForward and 
CGROUPS_ROOT_PidNamespaceBackward tests fail.
+ * [MESOS-8565] - Persistent volumes are not visible in Mesos UI when 
launching a pod using default executor.
 
 
 Release Notes - Mesos - Version 1.5.0



[1/2] mesos git commit: Attached/detached volume directory for task which has volume specified.

2018-02-14 Thread gilbert
Repository: mesos
Updated Branches:
  refs/heads/master a7714536f -> 636330c7b


Attached/detached volume directory for task which has volume specified.

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


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

Branch: refs/heads/master
Commit: 9d4c6d9576741cc480c75f8e59cc8d1adc9849fc
Parents: a771453
Author: Qian Zhang 
Authored: Wed Feb 14 00:17:37 2018 -0800
Committer: Gilbert Song 
Committed: Wed Feb 14 00:17:37 2018 -0800

--
 src/slave/slave.cpp | 144 ---
 src/slave/slave.hpp |  50 ++--
 2 files changed, 168 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/mesos/blob/9d4c6d95/src/slave/slave.cpp
--
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index f98f373..df8b33d 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -1031,6 +1031,7 @@ void Slave::attachTaskVolumeDirectory(
 
   CHECK_EQ(task.executor_id(), executorInfo.executor_id());
 
+  // This is the case that the task has disk resources specified.
   foreach (const Resource& resource, task.resources()) {
 // Ignore if there are no disk resources or if the
 // disk resources did not specify a volume mapping.
@@ -1040,15 +1041,15 @@ void Slave::attachTaskVolumeDirectory(
 
 const Volume& volume = resource.disk().volume();
 
-const string executorDirectory = paths::getExecutorRunPath(
+const string executorRunPath = paths::getExecutorRunPath(
 flags.work_dir,
 info.id(),
 task.framework_id(),
 task.executor_id(),
 executorContainerId);
 
-const string executorVolumePath =
-  path::join(executorDirectory, volume.container_path());
+const string executorDirectoryPath =
+  path::join(executorRunPath, volume.container_path());
 
 const string taskPath = paths::getTaskPath(
 flags.work_dir,
@@ -1058,16 +1059,86 @@ void Slave::attachTaskVolumeDirectory(
 executorContainerId,
 task.task_id());
 
-const string taskVolumePath =
+const string taskDirectoryPath =
   path::join(taskPath, volume.container_path());
 
-files->attach(executorVolumePath, taskVolumePath)
+files->attach(executorDirectoryPath, taskDirectoryPath)
   .onAny(defer(
   self(),
   ::fileAttached,
   lambda::_1,
-  executorVolumePath,
-  taskVolumePath));
+  executorDirectoryPath,
+  taskDirectoryPath));
+  }
+
+  // This is the case that the executor has disk resources specified
+  // and the task's ContainerInfo has a `SANDBOX_PATH` volume with type
+  // `PARENT` to share the executor's disk volume.
+  hashset executorContainerPaths;
+  foreach (const Resource& resource, executorInfo.resources()) {
+// Ignore if there are no disk resources or if the
+// disk resources did not specify a volume mapping.
+if (!resource.has_disk() || !resource.disk().has_volume()) {
+  continue;
+}
+
+const Volume& volume = resource.disk().volume();
+executorContainerPaths.insert(volume.container_path());
+  }
+
+  if (executorContainerPaths.empty()) {
+return;
+  }
+
+  if (task.has_container()) {
+foreach (const Volume& volume, task.container().volumes()) {
+  if (!volume.has_source() ||
+  volume.source().type() != Volume::Source::SANDBOX_PATH) {
+continue;
+  }
+
+  CHECK(volume.source().has_sandbox_path());
+
+  const Volume::Source::SandboxPath& sandboxPath =
+volume.source().sandbox_path();
+
+  if (sandboxPath.type() != Volume::Source::SandboxPath::PARENT) {
+continue;
+  }
+
+  if (!executorContainerPaths.contains(sandboxPath.path())) {
+continue;
+  }
+
+  const string executorRunPath = paths::getExecutorRunPath(
+  flags.work_dir,
+  info.id(),
+  task.framework_id(),
+  task.executor_id(),
+  executorContainerId);
+
+  const string executorDirectoryPath =
+path::join(executorRunPath, sandboxPath.path());
+
+  const string taskPath = paths::getTaskPath(
+  flags.work_dir,
+  info.id(),
+  task.framework_id(),
+  task.executor_id(),
+  executorContainerId,
+  task.task_id());
+
+  const string taskDirectoryPath =
+path::join(taskPath, volume.container_path());
+
+  files->attach(executorDirectoryPath, taskDirectoryPath)
+.onAny(defer(
+self(),
+::fileAttached,
+