You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2016/08/03 00:02:08 UTC

[3/6] mesos git commit: Added comments for tmpfs and sandbox mountpoints for bind backend.

Added comments for tmpfs and sandbox mountpoints for bind backend.

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


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

Branch: refs/heads/master
Commit: 5aa66ff187370168389628b8d447b4e83c3dbd22
Parents: 98ffcb1
Author: Gilbert Song <so...@gmail.com>
Authored: Tue Aug 2 16:49:58 2016 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Tue Aug 2 16:49:58 2016 -0700

----------------------------------------------------------------------
 .../containerizer/mesos/isolators/filesystem/linux.cpp    |  3 +++
 .../containerizer/mesos/provisioner/backends/bind.hpp     | 10 +++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5aa66ff1/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp b/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
index 31aa3e7..afcf978 100644
--- a/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
+++ b/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
@@ -340,6 +340,9 @@ Try<vector<CommandInfo>> LinuxFilesystemIsolatorProcess::getPreExecCommands(
         containerConfig.rootfs(),
         flags.sandbox_directory);
 
+    // If the rootfs is a read-only filesystem (e.g., using the bind
+    // backend), the sandbox must be already exist. Please see the
+    // comments in 'provisioner/backend.hpp' for details.
     Try<Nothing> mkdir = os::mkdir(sandbox);
     if (mkdir.isError()) {
       return Error(

http://git-wip-us.apache.org/repos/asf/mesos/blob/5aa66ff1/src/slave/containerizer/mesos/provisioner/backends/bind.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/provisioner/backends/bind.hpp b/src/slave/containerizer/mesos/provisioner/backends/bind.hpp
index 2b2fcdc..19d44c6 100644
--- a/src/slave/containerizer/mesos/provisioner/backends/bind.hpp
+++ b/src/slave/containerizer/mesos/provisioner/backends/bind.hpp
@@ -39,9 +39,13 @@ class BindBackendProcess;
 //    mounting read-write volumes to places like /tmp, /var/tmp,
 //    /home, etc. using the ContainerInfo. These can be relative to
 //    the executor work directory.
-//    N.B. Since the filesystem is read-only, '--sandbox_directory' must
-//    already exist within the filesystem because the filesystem isolator
-//    is unable to create it!
+//    N.B. Since the filesystem is read-only:
+//    i.  The '--sandbox_directory' must already exist within the
+//        filesystem because the filesystem isolator is unable to
+//        create it!
+//    ii. The 'tmpfs' moint point '/tmp' must already exist within
+//        the filesystem, because 'pivot_root' needs a mount point
+//        for the old root.
 // 3) It's fast because the bind mount requires (nearly) zero IO.
 class BindBackend : public Backend
 {