You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by qi...@apache.org on 2019/07/13 03:36:38 UTC

[mesos] branch master updated: Updated a comment in the `filesystem/linux` isolator.

This is an automated email from the ASF dual-hosted git repository.

qianzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/master by this push:
     new 575d47b  Updated a comment in the `filesystem/linux` isolator.
575d47b is described below

commit 575d47bebf42bd42d72dc53bf3075df59ff25e75
Author: Qian Zhang <zh...@gmail.com>
AuthorDate: Sat Jul 13 11:35:56 2019 +0800

    Updated a comment in the `filesystem/linux` isolator.
---
 src/slave/containerizer/mesos/isolators/filesystem/linux.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp b/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
index df33b35..ab19230 100644
--- a/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
+++ b/src/slave/containerizer/mesos/isolators/filesystem/linux.cpp
@@ -763,8 +763,10 @@ Future<Option<ContainerLaunchInfo>> LinuxFilesystemIsolatorProcess::prepare(
       }
     }
 
-    // If `namespaces/ipc` isolator is not enabled, /dev/shm will be
-    // handled there.
+    // If `namespaces/ipc` isolator is not enabled, for backward compatibility
+    // we will keep the previous behavior: if the container has its own rootfs,
+    // it will have its own /dev/shm, otherwise it will share agent's /dev/shm.
+    // If `namespaces/ipc` isolator is enabled, /dev/shm will be handled there.
     if (!strings::contains(flags.isolation, "namespaces/ipc")) {
       *launchInfo.add_mounts() = createContainerMount(
           "tmpfs",