> On Feb. 25, 2016, 11:40 p.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/provisioner/backends/overlay.cpp, lines 
> > 124-129
> > <https://reviews.apache.org/r/43932/diff/1/?file=1268084#file1268084line124>
> >
> >     To be safe, can you do the same thing to mark the mount as slave+shared 
> > (like we did in the bind backend).
> >     
> >     So the goal of doing that is: we want to make sure when slave fork a 
> > subprocess with a new mount namespace, it does not create an extra 
> > reference to the mount so that rmdir might fail later.
> 
> Shuai Lin wrote:
>     Updated. I am interested in how to reprduce the potential problem, but 
> failed to reproduce with these shell commands:
>     
>     
>     ```sh
>     mkdir -p /tmp/rootfs/folder1 /tmp/layer1
>     mount --bind /tmp/layer1 /tmp/rootfs/folder1
>     
>     # create a subprocess with a new mount namespace
>     unshare -m sleep 1000 &
>     
>     # Try to remove the mount dir, Expected: rm would failed, Result: rm 
> succeeded.
>     umount /tmp/rootfs/folder1
>     rm -rf /tmp/rootfs
>     ```
>     
>     I've also read about https://issues.apache.org/jira/browse/MESOS-3483 and 
> https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt, but 
> still don't understand this problem, can you provide some links on this?
> 
> Jie Yu wrote:
>     I think you're using a newer kernel. See this thread:
>     https://lwn.net/Articles/570338/
>     
>     You should be able to repo this problem using an older kernel (e.g., 
> 3.10).

Right, I was using kernel 4.2.0 (for better overlayfs support). With another 
ubuntu 12.04 vm with kernel 3.2.0 I can reproduce the bug with the above 
commands. Thanks!


- Shuai


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43932/#review120750
-----------------------------------------------------------


On Feb. 28, 2016, 5:22 p.m., Shuai Lin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43932/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2016, 5:22 p.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Bugs: MESOS-2971
>     https://issues.apache.org/jira/browse/MESOS-2971
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added overlayfs provisioning backend.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt b13fb23219ebb23bcfd6db062e1c814ca2114aa4 
>   src/Makefile.am 2a26261b513bb7c03437ed8e850c3b36b93d82f5 
>   src/slave/containerizer/mesos/provisioner/backend.cpp 
> 01d06ebc67e259272ee57ea5c75bf7077ede65c4 
>   src/slave/containerizer/mesos/provisioner/backends/overlay.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/provisioner/backends/overlay.cpp PRE-CREATION 
>   src/slave/flags.cpp 1c6a87b670efde2deab4d6e3f24fd6eb3704a47d 
>   src/tests/containerizer/provisioner_backend_tests.cpp 
> 25b28ef8fa5aae81e8dd0c9e33df4160dd912ce8 
>   src/tests/environment.cpp 6cd295f76496770774d090e0485ff87be378f74c 
> 
> Diff: https://reviews.apache.org/r/43932/diff/
> 
> 
> Testing
> -------
> 
> sudo modprobe overlayfs
> sudo make check -j4 
> GTEST_FILTER='OverlayBackendTest.ROOT_OVERLAYFS_OverlayFSBackend'
> 
> - OS: ubuntu 14.04 64bit vm
> - Kernel: 4.2.0-27-generic
> 
> 
> Thanks,
> 
> Shuai Lin
> 
>

Reply via email to