You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/08/22 01:33:05 UTC

[1/3] mesos git commit: Windows: Fully qualified reference to recordio::Decoder.

Repository: mesos
Updated Branches:
  refs/heads/master b4a345a31 -> 6b3e4b72a


Windows: Fully qualified reference to recordio::Decoder.

This reference is ambiguous when using precompiled headers as there
is a separate `mesos::internal::recordio` namespace that has higher
priority inside this codeblock.


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

Branch: refs/heads/master
Commit: 3b95dc9c054e396cd11a05392cc2c5400714571c
Parents: b4a345a
Author: Joseph Wu <jo...@apache.org>
Authored: Mon Aug 21 17:09:41 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Aug 21 18:00:43 2017 -0700

----------------------------------------------------------------------
 src/checks/checker_process.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/3b95dc9c/src/checks/checker_process.cpp
----------------------------------------------------------------------
diff --git a/src/checks/checker_process.cpp b/src/checks/checker_process.cpp
index 81d45b3..7985e8d 100644
--- a/src/checks/checker_process.cpp
+++ b/src/checks/checker_process.cpp
@@ -152,7 +152,7 @@ static Try<tuple<string, string>> decodeProcessIOData(const string& data)
   string stdoutReceived;
   string stderrReceived;
 
-  recordio::Decoder<v1::agent::ProcessIO> decoder(
+  ::recordio::Decoder<v1::agent::ProcessIO> decoder(
       lambda::bind(
           deserialize<v1::agent::ProcessIO>,
           ContentType::PROTOBUF,


[3/3] mesos git commit: Updated depiction of runtime directory file structure.

Posted by jo...@apache.org.
Updated depiction of runtime directory file structure.

This attempts to match the structure of the top level comments
in "slave/paths.hpp" and "slave/containerizer/mesos/paths.hpp".

The runtime directory tree/drawing now shows all potential entries
that can exist in the file structure and the potential nesting of
containers.

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


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

Branch: refs/heads/master
Commit: 6b3e4b72a0b8e67359ce2bbcd890c4e6c96289f4
Parents: b6549bd
Author: Joseph Wu <jo...@apache.org>
Authored: Mon Aug 21 14:48:36 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Aug 21 18:00:50 2017 -0700

----------------------------------------------------------------------
 src/slave/containerizer/mesos/paths.hpp | 42 +++++++++++++++++++---------
 1 file changed, 29 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/6b3e4b72/src/slave/containerizer/mesos/paths.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/paths.hpp b/src/slave/containerizer/mesos/paths.hpp
index 12ae7c7..a03f15e 100644
--- a/src/slave/containerizer/mesos/paths.hpp
+++ b/src/slave/containerizer/mesos/paths.hpp
@@ -37,6 +37,32 @@ namespace slave {
 namespace containerizer {
 namespace paths {
 
+
+// The containerizer uses the runtime directory to checkpoint things
+// for each container, like the PID of the first process executed
+// within a container (i.e., the "PID 1") or the LaunchInfo associated
+// with the given container.
+//
+// The file system layout is as follows:
+//
+//   root ('--runtime_dir' flag)
+//   |-- containers
+//       |-- <container_id>
+//           |-- containers
+//           |   |-- <container_id>
+//           |   |   |-- <more nesting of containers>
+//           |   |-- pid
+//           |   |-- ...
+//           |-- force_destroy_on_recovery
+//           |-- io_switchboard
+//           |   |-- pid
+//           |   |-- socket
+//           |-- launch_info
+//           |-- pid
+//           |-- status
+//           |-- termination
+
+
 constexpr char PID_FILE[] = "pid";
 constexpr char STATUS_FILE[] = "status";
 constexpr char TERMINATION_FILE[] = "termination";
@@ -69,19 +95,9 @@ std::string buildPath(
     const Mode& mode);
 
 
-// The containerizer uses the runtime directory (flag 'runtime_dir')
-// to checkpoint things for each container, e.g., the PID of the first
-// process executed within a container (i.e., the "PID 1") gets
-// checkpointed in a file called 'pid'. The following helper function
-// constructs the path for a container given the 'runtimeDir' that was
-// used as well as the container `containerId`. For example, given two
-// containers, one with ID 'a9dd' and one nested within 'a9dd' with ID
-// '4e3a' and with the flag 'runtime_dir' set to '/var/run/mesos' you
-// would have a directory structure that looks like:
-//
-// /var/run/mesos/containers/a9dd
-// /var/run/mesos/containers/a9dd/pid
-// /var/run/mesos/containers/a9dd/containers/4e3a/pid
+// The following helper function constructs the path
+// for a container given the 'runtimeDir' that was
+// used as well as the container `containerId`.
 std::string getRuntimePath(
     const std::string& runtimeDir,
     const ContainerID& containerId);

[2/3] mesos git commit: Renamed CONTAINERS_DIR to EXECUTOR_RUNS_DIR.

Posted by jo...@apache.org.
Renamed CONTAINERS_DIR to EXECUTOR_RUNS_DIR.

`CONTAINERS_DIR` will be used more accurately as the variable
for "containers", rather than "runs".

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


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

Branch: refs/heads/master
Commit: b6549bd4ba061b35227bc28e26e36d7d087e33d5
Parents: 3b95dc9
Author: Joseph Wu <jo...@apache.org>
Authored: Mon Aug 21 10:56:01 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Aug 21 18:00:50 2017 -0700

----------------------------------------------------------------------
 src/slave/paths.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b6549bd4/src/slave/paths.cpp
----------------------------------------------------------------------
diff --git a/src/slave/paths.cpp b/src/slave/paths.cpp
index eb6a28e..1a6943f 100644
--- a/src/slave/paths.cpp
+++ b/src/slave/paths.cpp
@@ -69,7 +69,7 @@ const char RESOURCES_TARGET_FILE[] = "resources.target";
 const char SLAVES_DIR[] = "slaves";
 const char FRAMEWORKS_DIR[] = "frameworks";
 const char EXECUTORS_DIR[] = "executors";
-const char CONTAINERS_DIR[] = "runs";
+const char EXECUTOR_RUNS_DIR[] = "runs";
 
 
 Try<ExecutorRunPath> parseExecutorRunPath(
@@ -103,7 +103,7 @@ Try<ExecutorRunPath> parseExecutorRunPath(
   if (tokens[0] == SLAVES_DIR &&
       tokens[2] == FRAMEWORKS_DIR &&
       tokens[4] == EXECUTORS_DIR &&
-      tokens[6] == CONTAINERS_DIR) {
+      tokens[6] == EXECUTOR_RUNS_DIR) {
     ExecutorRunPath path;
 
     path.slaveId.set_value(tokens[1]);
@@ -248,7 +248,7 @@ Try<list<string>> getExecutorRunPaths(
 {
   return fs::list(path::join(
       getExecutorPath(rootDir, slaveId, frameworkId, executorId),
-      CONTAINERS_DIR,
+      EXECUTOR_RUNS_DIR,
       "*"));
 }
 
@@ -262,7 +262,7 @@ string getExecutorRunPath(
 {
   return path::join(
       getExecutorPath(rootDir, slaveId, frameworkId, executorId),
-      CONTAINERS_DIR,
+      EXECUTOR_RUNS_DIR,
       stringify(containerId));
 }
 
@@ -311,7 +311,7 @@ string getExecutorLatestRunPath(
 {
   return path::join(
       getExecutorPath(rootDir, slaveId, frameworkId, executorId),
-      CONTAINERS_DIR,
+      EXECUTOR_RUNS_DIR,
       LATEST_SYMLINK);
 }