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/05/26 01:41:02 UTC

[11/16] mesos git commit: Removed extranous sandbox initialization in Docker containerizer.

Removed extranous sandbox initialization in Docker containerizer.

The Docker containerizer will create a stdout/stderr file as well
`chown` the sandbox directory to the user specified at container
creation time.  This logic is already performed elsewhere.

The stdout/stderr files will either be created prior to the container
launch via the mesos-fetcher, or during launch via the ContainerLogger.

The sandbox directory will be `chown`d by the Agent when it
starts to launch the executor.

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


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

Branch: refs/heads/master
Commit: 55c86cb4a03746b21b0532aca779f826fc1bc2e1
Parents: 55d7c9f
Author: Joseph Wu <jo...@apache.org>
Authored: Thu Apr 27 18:33:45 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Thu May 25 18:37:07 2017 -0700

----------------------------------------------------------------------
 src/slave/containerizer/docker.cpp | 25 -------------------------
 1 file changed, 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/55c86cb4/src/slave/containerizer/docker.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/docker.cpp b/src/slave/containerizer/docker.cpp
index 9418e01..c90750d 100644
--- a/src/slave/containerizer/docker.cpp
+++ b/src/slave/containerizer/docker.cpp
@@ -280,32 +280,7 @@ DockerContainerizerProcess::Container::create(
     bool checkpoint,
     const Flags& flags)
 {
-  // Before we do anything else we first make sure the stdout/stderr
-  // files exist and have the right file ownership.
-  Try<Nothing> touch = os::touch(path::join(directory, "stdout"));
 
-  if (touch.isError()) {
-    return Error("Failed to touch 'stdout': " + touch.error());
-  }
-
-  touch = os::touch(path::join(directory, "stderr"));
-
-  if (touch.isError()) {
-    return Error("Failed to touch 'stderr': " + touch.error());
-  }
-
-  // NOTE: `os::chown` has no meaningful interpretation on Windows. This is
-  // safe to `#ifdef` out because we don't compile the user flag on Windows, so
-  // this should always be `None`.
-#ifndef __WINDOWS__
-  if (user.isSome()) {
-    Try<Nothing> chown = os::chown(user.get(), directory);
-
-    if (chown.isError()) {
-      return Error("Failed to chown: " + chown.error());
-    }
-  }
-#endif // __WINDOWS__
 
   string dockerSymlinkPath = path::join(
       paths::getSlavePath(flags.work_dir, slaveId),