You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jie Yu <yu...@gmail.com> on 2017/10/23 04:42:44 UTC

Review Request 63211: Moved the logic of setting '/' as rslave into the launch helper.

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

Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.


Bugs: MESOS-7306
    https://issues.apache.org/jira/browse/MESOS-7306


Repository: mesos


Description
-------

This patch prepares for the mount propagation support. In the future,
we can no longer set the root mount as rslave bindly because some
mounts need to be shared. Move this logic to the launch helper is a
necessary step. We will add more logic there to selectively mark some
mount as shared, and the rest as slave.


Diffs
-----

  src/slave/containerizer/mesos/isolators/filesystem/linux.cpp faf94909f995f7486b5f9cb7532af58a90a9eed3 
  src/slave/containerizer/mesos/launch.cpp 49f11f1d586672bb46f6eccabcfda9321cc3c607 


Diff: https://reviews.apache.org/r/63211/diff/1/


Testing
-------

sudo make check


Thanks,

Jie Yu


Re: Review Request 63211: Moved the logic of setting '/' as rslave into the launch helper.

Posted by Gilbert Song <so...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63211/#review192079
-----------------------------------------------------------


Ship it!




Ship It!

- Gilbert Song


On Nov. 26, 2017, 8:49 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63211/
> -----------------------------------------------------------
> 
> (Updated Nov. 26, 2017, 8:49 p.m.)
> 
> 
> Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
> 
> 
> Bugs: MESOS-7306
>     https://issues.apache.org/jira/browse/MESOS-7306
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch prepares for the mount propagation support. In the future,
> we can no longer set the root mount as rslave bindly because some
> mounts need to be shared. Move this logic to the launch helper is a
> necessary step. We will add more logic there to selectively mark some
> mount as shared, and the rest as slave.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/filesystem/linux.cpp faf94909f995f7486b5f9cb7532af58a90a9eed3 
>   src/slave/containerizer/mesos/launch.cpp b1584ff292ada5463917792908a13e00859fd1ae 
> 
> 
> Diff: https://reviews.apache.org/r/63211/diff/2/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 63211: Moved the logic of setting '/' as rslave into the launch helper.

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63211/
-----------------------------------------------------------

(Updated Nov. 27, 2017, 4:49 a.m.)


Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.


Changes
-------

Addressed comments.


Bugs: MESOS-7306
    https://issues.apache.org/jira/browse/MESOS-7306


Repository: mesos


Description
-------

This patch prepares for the mount propagation support. In the future,
we can no longer set the root mount as rslave bindly because some
mounts need to be shared. Move this logic to the launch helper is a
necessary step. We will add more logic there to selectively mark some
mount as shared, and the rest as slave.


Diffs (updated)
-----

  src/slave/containerizer/mesos/isolators/filesystem/linux.cpp faf94909f995f7486b5f9cb7532af58a90a9eed3 
  src/slave/containerizer/mesos/launch.cpp b1584ff292ada5463917792908a13e00859fd1ae 


Diff: https://reviews.apache.org/r/63211/diff/2/

Changes: https://reviews.apache.org/r/63211/diff/1-2/


Testing
-------

sudo make check


Thanks,

Jie Yu


Re: Review Request 63211: Moved the logic of setting '/' as rslave into the launch helper.

Posted by Jie Yu <yu...@gmail.com>.

> On Oct. 25, 2017, 9:24 p.m., James Peach wrote:
> > src/slave/containerizer/mesos/launch.cpp
> > Lines 247 (patched)
> > <https://reviews.apache.org/r/63211/diff/1/?file=1865620#file1865620line247>
> >
> >     How does this interact with the "unshare_namespace_mnt" flag? Do we also want to mark mounts made in that new namespace as slave mounts?

`unshare_namespace_mnt` is only used by command executor to fork/exec the user tasks, and all volumes for command task are prepared in the executro level. Therefore, there will be no `Mount`. I'll add a CHECK there.


> On Oct. 25, 2017, 9:24 p.m., James Peach wrote:
> > src/slave/containerizer/mesos/launch.cpp
> > Lines 256 (patched)
> > <https://reviews.apache.org/r/63211/diff/1/?file=1865620#file1865620line256>
> >
> >     I didn't quite understand what you meant by "recursively slave propagation". Could you clarify this a bit?

Clarify the comment. (i.e., --make-rslave)


- Jie


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


On Oct. 23, 2017, 4:42 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63211/
> -----------------------------------------------------------
> 
> (Updated Oct. 23, 2017, 4:42 a.m.)
> 
> 
> Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
> 
> 
> Bugs: MESOS-7306
>     https://issues.apache.org/jira/browse/MESOS-7306
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch prepares for the mount propagation support. In the future,
> we can no longer set the root mount as rslave bindly because some
> mounts need to be shared. Move this logic to the launch helper is a
> necessary step. We will add more logic there to selectively mark some
> mount as shared, and the rest as slave.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/filesystem/linux.cpp faf94909f995f7486b5f9cb7532af58a90a9eed3 
>   src/slave/containerizer/mesos/launch.cpp 49f11f1d586672bb46f6eccabcfda9321cc3c607 
> 
> 
> Diff: https://reviews.apache.org/r/63211/diff/1/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Re: Review Request 63211: Moved the logic of setting '/' as rslave into the launch helper.

Posted by James Peach <jp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63211/#review189101
-----------------------------------------------------------




src/slave/containerizer/mesos/launch.cpp
Lines 247 (patched)
<https://reviews.apache.org/r/63211/#comment266035>

    How does this interact with the "unshare_namespace_mnt" flag? Do we also want to mark mounts made in that new namespace as slave mounts?



src/slave/containerizer/mesos/launch.cpp
Lines 250 (patched)
<https://reviews.apache.org/r/63211/#comment266023>

    "the mount namespace"



src/slave/containerizer/mesos/launch.cpp
Lines 251 (patched)
<https://reviews.apache.org/r/63211/#comment266024>

    "pollute"



src/slave/containerizer/mesos/launch.cpp
Lines 256 (patched)
<https://reviews.apache.org/r/63211/#comment266025>

    I didn't quite understand what you meant by "recursively slave propagation". Could you clarify this a bit?


- James Peach


On Oct. 23, 2017, 4:42 a.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63211/
> -----------------------------------------------------------
> 
> (Updated Oct. 23, 2017, 4:42 a.m.)
> 
> 
> Review request for mesos, Gilbert Song, James Peach, and Joseph Wu.
> 
> 
> Bugs: MESOS-7306
>     https://issues.apache.org/jira/browse/MESOS-7306
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch prepares for the mount propagation support. In the future,
> we can no longer set the root mount as rslave bindly because some
> mounts need to be shared. Move this logic to the launch helper is a
> necessary step. We will add more logic there to selectively mark some
> mount as shared, and the rest as slave.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/filesystem/linux.cpp faf94909f995f7486b5f9cb7532af58a90a9eed3 
>   src/slave/containerizer/mesos/launch.cpp 49f11f1d586672bb46f6eccabcfda9321cc3c607 
> 
> 
> Diff: https://reviews.apache.org/r/63211/diff/1/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>