You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2017/05/11 10:16:50 UTC

[09/11] mesos git commit: Explained how container working directory differs from its sandbox.

Explained how container working directory differs from its sandbox.

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


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

Branch: refs/heads/master
Commit: 6ed5207b7c0ecf08b117ef123a4b3b96aabc9bac
Parents: 8b06fbc
Author: Alexander Rukletsov <al...@apache.org>
Authored: Thu Apr 27 17:26:18 2017 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Thu May 11 12:15:55 2017 +0200

----------------------------------------------------------------------
 include/mesos/slave/containerizer.proto         | 5 +++--
 src/slave/containerizer/mesos/containerizer.cpp | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/6ed5207b/include/mesos/slave/containerizer.proto
----------------------------------------------------------------------
diff --git a/include/mesos/slave/containerizer.proto b/include/mesos/slave/containerizer.proto
index 41f2905..bfe84b4 100644
--- a/include/mesos/slave/containerizer.proto
+++ b/include/mesos/slave/containerizer.proto
@@ -184,8 +184,9 @@ message ContainerLaunchInfo {
   // a command task.
   optional CommandInfo command = 5;
 
-  // The working directory for the container.
-  // NOTE: This is different than Mesos sandbox.
+  // The working directory for the container. It is set to container
+  // sandbox, i.e., Mesos sandbox, unless one of the isolators overrides
+  // it *and* the container defines an image.
   optional string working_directory = 6;
 
   // (Linux only) The capabilities requested for the container.

http://git-wip-us.apache.org/repos/asf/mesos/blob/6ed5207b/src/slave/containerizer/mesos/containerizer.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/containerizer.cpp b/src/slave/containerizer/mesos/containerizer.cpp
index 13e5e3c..9c382a8 100644
--- a/src/slave/containerizer/mesos/containerizer.cpp
+++ b/src/slave/containerizer/mesos/containerizer.cpp
@@ -1497,7 +1497,8 @@ Future<bool> MesosContainerizerProcess::_launch(
     launchInfo.set_rootfs(container->config.rootfs());
   }
 
-  // Determine the working directory for the container.
+  // Determine the working directory for the container. It is set to container
+  // sandbox, i.e., MESOS_SANDBOX, unless one of the isolators overrides it.
   if (launchInfo.has_rootfs()) {
     if (!launchInfo.has_working_directory()) {
       launchInfo.set_working_directory(flags.sandbox_directory);