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:05:39 UTC

[1/2] mesos git commit: Supported scratch containers in Unified Containerizer.

Repository: mesos
Updated Branches:
  refs/heads/1.0.x 0324916fc -> d3e6a857e


Supported scratch containers in Unified Containerizer.

Before this patch, we are assuming the 'tmpfs' mount point '/tmp'
always exist in the container's new rootfs. However, this is not
true. For the scratch container (which is a common case), '/tmp'
may not exist, and there may only be an executable binary in the
new rootfs. So we need to create the mount point for 'tmpfs' in
fs::enter().

However, this change may break some cases using the bind backend,
because we are not able the create the '/tmp' mount point in a
read-only filesystem. So we require users to make sure the
directory '/tmp' must already exist in their single layer scratch
images for the following reasons:
  1. For most cases, when operators prefer using the bind backend,
     the single-layer images are usually large in size, and '/tmp'
     exists in the rootfs.
  2. For scratch images, most of them contain more than one layer,
     which means the bind backend cannot be used in those cases.
     So we can create the '/tmp' mount point if it does not exist.
  3. If this is strictly a single layer scratch image, it is
     reasonable that we require users to make sure the mount point
     '/tmp' existed in the image rootfs if they are using the bind
     backend, because we already require the sandbox mount point
     to be existed in those iamges.

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


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

Branch: refs/heads/1.0.x
Commit: f942ccda348a3bf2fd28658e653c6f928c86a9a5
Parents: 0324916
Author: Gilbert Song <so...@gmail.com>
Authored: Tue Aug 2 16:49:43 2016 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Tue Aug 2 17:05:12 2016 -0700

----------------------------------------------------------------------
 src/linux/fs.cpp | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/f942ccda/src/linux/fs.cpp
----------------------------------------------------------------------
diff --git a/src/linux/fs.cpp b/src/linux/fs.cpp
index 27d322c..f57db80 100644
--- a/src/linux/fs.cpp
+++ b/src/linux/fs.cpp
@@ -601,8 +601,15 @@ Try<Nothing> enter(const string& root)
   // new root is writable (i.e., it could be a read only filesystem).
   // Therefore, we always mount a tmpfs on /tmp in the new root so
   // that we can create the mount point for the old root.
-  if (!os::exists(path::join(root, "tmp"))) {
-    return Error("/tmp in chroot does not exist");
+  //
+  // NOTE: If the new root is a read-only filesystem (e.g., using bind
+  // backend), the 'tmpfs' mount point '/tmp' must already exist in the
+  // new root. Otherwise, mkdir would return an error because of unable
+  // to create it in read-only filesystem.
+  Try<Nothing> mkdir = os::mkdir(path::join(root, "tmp"));
+  if (mkdir.isError()) {
+    return Error("Failed to create 'tmpfs' mount point at '" +
+                 path::join(root, "tmp") + "': " + mkdir.error());
   }
 
   // TODO(jieyu): Consider limiting the size of the tmpfs.


[2/2] mesos git commit: Added MESOS-5927 to 1.0.1 CHANGELOG.

Posted by ji...@apache.org.
Added MESOS-5927 to 1.0.1 CHANGELOG.

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


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

Branch: refs/heads/1.0.x
Commit: d3e6a857e0859369d66945d8055822fa2e4235be
Parents: f942ccd
Author: Gilbert Song <so...@gmail.com>
Authored: Tue Aug 2 16:59:50 2016 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Tue Aug 2 17:05:26 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/d3e6a857/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 96f5adf..389ece7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -8,6 +8,7 @@ All Issues:
   * [MESOS-5911] - Webui redirection to leader in browser does not work.
   * [MESOS-5913] - Stale socket FD usage when using libevent + SSL.
   * [MESOS-5923] - Ubuntu 14.04 LTS GPU Isolator "/run" directory is noexec.
+  * [MESOS-5927] - Unable to run "scratch" Dockerfiles with Unified Containerizer.
   * [MESOS-5943] - Incremental http parsing of URLs leads to decoder error.
   * [MESOS-5945] - NvidiaVolume::create() should check for root before creating volume.
   * [MESOS-5959] - All non-root tests fail on GPU machine.