----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67094/#review202969 -----------------------------------------------------------
Great to see the split of `fs::enter::prepare` from `fs::enter::chroot`. Let's make sure the parts dealing with `$rootfs/tmp` are symmetric within `fs::enter::chroot` first and I'm fine with the rest. We could even consider moving some parts of `fs::enter::prepare` into `launch.cpp` after my chain gets merged into master. src/linux/fs.cpp Lines 940-966 (original), 940-966 (patched) <https://reviews.apache.org/r/67094/#comment285032> I would suggest that `fs::chroot::enter` starts here, as later in `fs::chroot::enter` we have `fs::umount("/tmp")`. We should consider making `fs::chroot::enter` symmetric when dealing with `$rootfs/tmp`, as well as making it an extended `pivot_root(2)` with no unnecessary preparations and cleanups. - Jason Lai On May 11, 2018, 6:31 p.m., James Peach wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/67094/ > ----------------------------------------------------------- > > (Updated May 11, 2018, 6:31 p.m.) > > > Review request for mesos, Gilbert Song, Jason Lai, Jie Yu, and Zhitao Li. > > > Bugs: MESOS-8792 > https://issues.apache.org/jira/browse/MESOS-8792 > > > Repository: mesos > > > Description > ------- > > Since we will need to perform additional work to configure > the chroot before entering it, split the Linux chroot API > into `fs::chroot::prepare()` and `fs::chroot::enter()`. > > > Diffs > ----- > > src/linux/fs.hpp 76dc09c38996eefd8487ba6ef4977ef2f7c9df4c > src/linux/fs.cpp fbd03b19abb9b56dbf3fb8a84d09a39171bbc1b0 > src/slave/containerizer/mesos/launch.cpp > f25d90651ef32495c9161c3eaed8a327d1b2b926 > > > Diff: https://reviews.apache.org/r/67094/diff/1/ > > > Testing > ------- > > manual > > > Thanks, > > James Peach > >