You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Andrei Budnik <ab...@mesosphere.com> on 2019/06/19 14:49:33 UTC

Review Request 70890: Added `LauncherTracker` for tracking calls of launcher methods.

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

Review request for mesos, Gilbert Song and Qian Zhang.


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


Repository: mesos


Description
-------

This patch adds a new `LauncherTracker` class that intercepts
`Launcher` calls and uses `track` function for detecting very
slow or stuck operations on the real launcher.


Diffs
-----

  src/CMakeLists.txt 1d4f541b73c07a307a8b61f217e0cfad5dc095e4 
  src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
  src/slave/containerizer/mesos/launcher_tracker.hpp PRE-CREATION 
  src/slave/containerizer/mesos/launcher_tracker.cpp PRE-CREATION 


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


Testing
-------


Thanks,

Andrei Budnik


Re: Review Request 70890: Added `LauncherTracker` for tracking calls of launcher methods.

Posted by Andrei Budnik <ab...@mesosphere.com>.

> On Июль 1, 2019, 7:01 д.п., Qian Zhang wrote:
> > src/slave/containerizer/mesos/launcher_tracker.cpp
> > Lines 58 (patched)
> > <https://reviews.apache.org/r/70890/diff/1/?file=2151368#file2151368line58>
> >
> >     This method should be tracked as well.

Wrapped synchronous operation in a lambda function that is executed via `process::async`.


- Andrei


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


On Июнь 19, 2019, 2:49 п.п., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70890/
> -----------------------------------------------------------
> 
> (Updated Июнь 19, 2019, 2:49 п.п.)
> 
> 
> Review request for mesos, Gilbert Song and Qian Zhang.
> 
> 
> Bugs: MESOS-9840
>     https://issues.apache.org/jira/browse/MESOS-9840
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a new `LauncherTracker` class that proxies
> calls to the real `Launcher` and keeps track of returned futures
> by employing `PendingFutureTracker` class.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt eb4e2ac699121ac16e2ac58e4606b26aae906ad8 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/slave/containerizer/mesos/launcher_tracker.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/launcher_tracker.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70890/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 70890: Added `LauncherTracker` for tracking calls of launcher methods.

Posted by Qian Zhang <zh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70890/#review216261
-----------------------------------------------------------




src/slave/containerizer/mesos/launcher_tracker.cpp
Lines 58 (patched)
<https://reviews.apache.org/r/70890/#comment303391>

    This method should be tracked as well.


- Qian Zhang


On June 19, 2019, 10:49 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70890/
> -----------------------------------------------------------
> 
> (Updated June 19, 2019, 10:49 p.m.)
> 
> 
> Review request for mesos, Gilbert Song and Qian Zhang.
> 
> 
> Bugs: MESOS-9840
>     https://issues.apache.org/jira/browse/MESOS-9840
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a new `LauncherTracker` class that intercepts
> `Launcher` calls and uses `track` function for detecting very
> slow or stuck operations on the real launcher.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt 1d4f541b73c07a307a8b61f217e0cfad5dc095e4 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/slave/containerizer/mesos/launcher_tracker.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/launcher_tracker.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70890/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 70890: Added `LauncherTracker` for tracking calls of launcher methods.

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




src/slave/containerizer/mesos/launcher_tracker.cpp
Lines 62-80 (patched)
<https://reviews.apache.org/r/70890/#comment303901>

    Could we avoid returning future.get(). It is not a risk here but not very readable.
    
    We could rely on a promise:
    ```
      Promise<pid_t> promise;
      tracker->track(
          promise.future(),
          "launcher::fork",
          COMPONENT_NAME_CONTAINERIZER,
          {{"containerId", stringify(containerId)},
           {"path", path}});
    
      Try<pid_t> forked = launcher->fork(
          containerId,
          path,
          argv,
          containerIO,
          flags,
          environment,
          enterNamespaces,
          cloneNamespaces,
          whitelistFds);
    
      promise.associate(forked);
      return forked;
    ```


- Gilbert Song


On June 19, 2019, 7:49 a.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70890/
> -----------------------------------------------------------
> 
> (Updated June 19, 2019, 7:49 a.m.)
> 
> 
> Review request for mesos, Gilbert Song and Qian Zhang.
> 
> 
> Bugs: MESOS-9840
>     https://issues.apache.org/jira/browse/MESOS-9840
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a new `LauncherTracker` class that proxies
> calls to the real `Launcher` and keeps track of returned futures
> by employing `PendingFutureTracker` class.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt eb4e2ac699121ac16e2ac58e4606b26aae906ad8 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/slave/containerizer/mesos/launcher_tracker.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/launcher_tracker.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70890/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 70890: Added `LauncherTracker` for tracking calls of launcher methods.

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


Ship it!




Ship It!

- Gilbert Song


On June 19, 2019, 7:49 a.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70890/
> -----------------------------------------------------------
> 
> (Updated June 19, 2019, 7:49 a.m.)
> 
> 
> Review request for mesos, Gilbert Song and Qian Zhang.
> 
> 
> Bugs: MESOS-9840
>     https://issues.apache.org/jira/browse/MESOS-9840
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a new `LauncherTracker` class that proxies
> calls to the real `Launcher` and keeps track of returned futures
> by employing `PendingFutureTracker` class.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt 6d1409003c4727f6a627f0c0f20d65c2db623012 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/slave/containerizer/mesos/launcher_tracker.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/launcher_tracker.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70890/diff/4/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 70890: Added `LauncherTracker` for tracking calls of launcher methods.

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



seems like this is a tracker wrapper similar to the isolatorTracker.

A quick question:
if the a container launch gets stuck at systemd cgroup hierachy isolate, could our tracker process be able to tell it is systemd?

- Gilbert Song


On June 19, 2019, 7:49 a.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70890/
> -----------------------------------------------------------
> 
> (Updated June 19, 2019, 7:49 a.m.)
> 
> 
> Review request for mesos, Gilbert Song and Qian Zhang.
> 
> 
> Bugs: MESOS-9840
>     https://issues.apache.org/jira/browse/MESOS-9840
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a new `LauncherTracker` class that proxies
> calls to the real `Launcher` and keeps track of returned futures
> by employing `PendingFutureTracker` class.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt eb4e2ac699121ac16e2ac58e4606b26aae906ad8 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/slave/containerizer/mesos/launcher_tracker.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/launcher_tracker.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70890/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 70890: Added `LauncherTracker` for tracking calls of launcher methods.

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


Ship it!




Ship It!

- Gilbert Song


On June 19, 2019, 7:49 a.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70890/
> -----------------------------------------------------------
> 
> (Updated June 19, 2019, 7:49 a.m.)
> 
> 
> Review request for mesos, Gilbert Song and Qian Zhang.
> 
> 
> Bugs: MESOS-9840
>     https://issues.apache.org/jira/browse/MESOS-9840
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a new `LauncherTracker` class that proxies
> calls to the real `Launcher` and keeps track of returned futures
> by employing `PendingFutureTracker` class.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt eb4e2ac699121ac16e2ac58e4606b26aae906ad8 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/slave/containerizer/mesos/launcher_tracker.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/launcher_tracker.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70890/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>