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 2018/02/07 19:30:54 UTC

Re: Review Request 62800: Created cgroups under systemd hierarchy in LinuxLauncher.


> On Oct. 7, 2017, 12:23 a.m., James Peach wrote:
> > src/slave/containerizer/mesos/linux_launcher.cpp
> > Lines 189 (patched)
> > <https://reviews.apache.org/r/62800/diff/1/?file=1847178#file1847178line189>
> >
> >     This is racy, but we can fix it by ensuring that `os::mkdir` checks for `EEXIST` even when it is non-recursive.

This is under mesos cgroup root, i don't race is a big concern. I've been following what we did in cgroups isolator. I'd prefer consistency here.


- Jie


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


On Oct. 6, 2017, 10:04 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62800/
> -----------------------------------------------------------
> 
> (Updated Oct. 6, 2017, 10:04 p.m.)
> 
> 
> Review request for mesos, James Peach, Joris Van Remoortere, and Joseph Wu.
> 
> 
> Bugs: MESOS-7990
>     https://issues.apache.org/jira/browse/MESOS-7990
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch added the support for systemd hierarchy in LinuxLauncher.
> It created the same cgroup layout under the systemd hierarchy (if
> systemd is enabled) as that in the freezer hierarchy.
> 
> This can give us a bunch of benefits:
> 1) systemd-cgls can list mesos container processes.
> 2) systemd-cgtop can show stats for mesos containers.
> 3) Avoid the pid migration issue described in MESOS-3352.
> 
> For example:
> 
> ```
> |[jie@core-dev ~]$ systemd-cgls
> |-1 /usr/lib/systemd/systemd --system --deserialize 20
> |-mesos
> |  |-8282b91a-5724-4964-a623-7c6bd68ff4ad
> |     |-31737 /usr/libexec/mesos/mesos-containerizer launch
> |     |-31739 mesos-default-executor --launcher_dir=/usr/libexec/mesos
> |     |-mesos
> |        |-8555f4af-fa4f-4c9c-aeb3-0c9f72e6a2de
> |           |-31791 /usr/libexec/mesos/mesos-containerizer launch
> |           |-31793 sleep 1000
> ```
> 
> 
> Diffs
> -----
> 
>   src/linux/systemd.hpp f760e2c02683f0169ba5d3b0a3da53f66a7f3d91 
>   src/slave/containerizer/mesos/linux_launcher.cpp 554c598e2a7a53aede9d8761740d8efceb4a7e39 
> 
> 
> Diff: https://reviews.apache.org/r/62800/diff/1/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> I also use the steps describe in MESOS-3352 to repo the systemd pid migration issue. Didn't observe it after applying the patch.
> 
> 
> Thanks,
> 
> Jie Yu
> 
>