> On Feb. 25, 2016, 11:40 p.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/provisioner/backends/overlay.hpp, lines 30-31
> > <https://reviews.apache.org/r/43932/diff/1/?file=1268083#file1268083line30>
> >
> >     can you wrap comments in 70 char width. It's less jagged IMO.

done


> 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.

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?


> On Feb. 25, 2016, 11:40 p.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/provisioner/backends/overlay.cpp, lines 
> > 132-133
> > <https://reviews.apache.org/r/43932/diff/1/?file=1268084#file1268084line132>
> >
> >     Can you align the error message:
> >     ```
> >     return Failure(
> >         "Failed to remount rootfs '" + rootfs +
> >         "' read-only: " + mount.error());
> >     ```

Reformatted this function with clang-format.


> On Feb. 25, 2016, 11:40 p.m., Jie Yu wrote:
> > src/tests/containerizer/provisioner_backend_tests.cpp, line 51
> > <https://reviews.apache.org/r/43932/diff/1/?file=1268086#file1268086line51>
> >
> >     We should add an TearDown method to unmount anything under sandbox. You 
> > can take a look at fs::unmountAll.

Refactored out the `TearDown` method of BindBackendTest into a common 
`MountBackendTest` class so it could be reused for all mount-based backend like 
bind/overlay/aufs.


- Shuai


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


On Feb. 24, 2016, 4:38 p.m., Shuai Lin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43932/
> -----------------------------------------------------------
> 
> (Updated Feb. 24, 2016, 4:38 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