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:16 UTC

Review Request 70888: Added `IsolatorTracker` for tracking calls of isolator methods.

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

Review request for mesos, Gilbert Song and Qian Zhang.


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


Repository: mesos


Description
-------

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


Diffs
-----

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


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


Testing
-------


Thanks,

Andrei Budnik


Re: Review Request 70888: Added `IsolatorTracker` for tracking calls of isolator methods.

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

> On Июль 1, 2019, 3:08 д.п., Qian Zhang wrote:
> > src/slave/containerizer/mesos/isolator_tracker.cpp
> > Lines 95-96 (patched)
> > <https://reviews.apache.org/r/70888/diff/1/?file=2151363#file2151363line95>
> >
> >     Do we really need to track `watch`? The future returned by `watch` is supposed to be pending as long as the container is running, right? I think what we care about is the future which is supposed to be ready soon but pending for a long time somehow.

Removed tracking of `watch`.
Added a comment.


- Andrei


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


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


Re: Review Request 70888: Added `IsolatorTracker` for tracking calls of isolator methods.

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




src/slave/containerizer/mesos/isolator_tracker.cpp
Lines 95-96 (patched)
<https://reviews.apache.org/r/70888/#comment303386>

    Do we really need to track `watch`? The future returned by `watch` is supposed to be pending as long as the container is running, right? I think what we care about is the future which is supposed to be ready soon but pending for a long time somehow.



src/slave/containerizer/mesos/isolator_tracker.cpp
Lines 111 (patched)
<https://reviews.apache.org/r/70888/#comment303387>

    Better to add `stringify(resources)`.


- 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/70888/
> -----------------------------------------------------------
> 
> (Updated June 19, 2019, 10:49 p.m.)
> 
> 
> Review request for mesos, Gilbert Song and Qian Zhang.
> 
> 
> Bugs: MESOS-9839
>     https://issues.apache.org/jira/browse/MESOS-9839
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a new `IsolatorTracker` class that intercepts
> `Isolator` calls and uses `track` function for detecting very
> slow or stuck operations on the real isolator.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt 1d4f541b73c07a307a8b61f217e0cfad5dc095e4 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/slave/constants.hpp cc81e5111e8c3082c940b918230f660a1121a1ac 
>   src/slave/containerizer/mesos/isolator_tracker.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolator_tracker.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70888/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 70888: Added `IsolatorTracker` for tracking calls of isolator methods.

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


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/70888/
> -----------------------------------------------------------
> 
> (Updated June 19, 2019, 7:49 a.m.)
> 
> 
> Review request for mesos, Gilbert Song and Qian Zhang.
> 
> 
> Bugs: MESOS-9839
>     https://issues.apache.org/jira/browse/MESOS-9839
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a new `IsolatorTracker` class that proxies
> calls to the real isolator and keeps track of returned futures
> by employing `PendingFutureTracker` class.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt eb4e2ac699121ac16e2ac58e4606b26aae906ad8 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/slave/constants.hpp cc81e5111e8c3082c940b918230f660a1121a1ac 
>   src/slave/containerizer/mesos/isolator_tracker.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolator_tracker.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70888/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 70888: Added `IsolatorTracker` for tracking calls of isolator methods.

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

> On Июль 16, 2019, 7:23 д.п., Gilbert Song wrote:
> > src/slave/constants.hpp
> > Lines 205-207 (patched)
> > <https://reviews.apache.org/r/70888/diff/3/?file=2154859#file2154859line205>
> >
> >     are you using `COMPONENT_NAME_` prefix because `MESOS_CONTAINERIZER` is already defined in containerizer/mesos/constant.hpp?
> >     
> >     probably let's figure out what `string component` stand for first. Then, we could better define the constant, and I would probably suggest to have the constant in containerizer/mesos/constant.hpp because we may have docker container stuck issue and if the docker container use this tracker process we need to distinguish two containerizers.

`/containerizer/endpoint` exposes information about both Docker and Mesos containerizers, so they belong to the same component.

`PendingFutureTracker` is a common code which is independent from the Mesos containerizer.


> On Июль 16, 2019, 7:23 д.п., Gilbert Song wrote:
> > src/slave/containerizer/mesos/isolator_tracker.hpp
> > Lines 71 (patched)
> > <https://reviews.apache.org/r/70888/diff/3/?file=2154860#file2154860line71>
> >
> >     could this be a Owned pointer?

Yes, but why? Pointer seems consistent with other subsystems, see https://github.com/apache/mesos/blob/633b1b5d4ef3f08b0abf057a3651f34116e1e45f/src/slave/containerizer/containerizer.hpp#L75-L78


- Andrei


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


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


Re: Review Request 70888: Added `IsolatorTracker` for tracking calls of isolator methods.

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




src/slave/constants.hpp
Lines 205-207 (patched)
<https://reviews.apache.org/r/70888/#comment303844>

    are you using `COMPONENT_NAME_` prefix because `MESOS_CONTAINERIZER` is already defined in containerizer/mesos/constant.hpp?
    
    probably let's figure out what `string component` stand for first. Then, we could better define the constant, and I would probably suggest to have the constant in containerizer/mesos/constant.hpp because we may have docker container stuck issue and if the docker container use this tracker process we need to distinguish two containerizers.



src/slave/containerizer/mesos/isolator_tracker.hpp
Lines 71 (patched)
<https://reviews.apache.org/r/70888/#comment303845>

    could this be a Owned pointer?


- 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/70888/
> -----------------------------------------------------------
> 
> (Updated June 19, 2019, 7:49 a.m.)
> 
> 
> Review request for mesos, Gilbert Song and Qian Zhang.
> 
> 
> Bugs: MESOS-9839
>     https://issues.apache.org/jira/browse/MESOS-9839
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a new `IsolatorTracker` class that proxies
> calls to the real isolator and keeps track of returned futures
> by employing `PendingFutureTracker` class.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt eb4e2ac699121ac16e2ac58e4606b26aae906ad8 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/slave/constants.hpp cc81e5111e8c3082c940b918230f660a1121a1ac 
>   src/slave/containerizer/mesos/isolator_tracker.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolator_tracker.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70888/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 70888: Added `IsolatorTracker` for tracking calls of isolator methods.

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


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/70888/
> -----------------------------------------------------------
> 
> (Updated June 19, 2019, 7:49 a.m.)
> 
> 
> Review request for mesos, Gilbert Song and Qian Zhang.
> 
> 
> Bugs: MESOS-9839
>     https://issues.apache.org/jira/browse/MESOS-9839
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a new `IsolatorTracker` class that proxies
> calls to the real isolator and keeps track of returned futures
> by employing `PendingFutureTracker` class.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt eb4e2ac699121ac16e2ac58e4606b26aae906ad8 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/slave/constants.hpp cc81e5111e8c3082c940b918230f660a1121a1ac 
>   src/slave/containerizer/mesos/isolator_tracker.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolator_tracker.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70888/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>