You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Ian Downes <ia...@gmail.com> on 2014/06/09 06:15:58 UTC

Re: Review Request 20818: Refactored cgroups::destroy to use a single pass and to reap processes.

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

(Updated June 8, 2014, 9:15 p.m.)


Review request for mesos and Jie Yu.


Changes
-------

Rebased.


Bugs: MESOS-759 and MESOS-976
    https://issues.apache.org/jira/browse/MESOS-759
    https://issues.apache.org/jira/browse/MESOS-976


Repository: mesos-git


Description
-------

    internal::Destroyer now uses a single pass of freeze, kill, thaw, reap
    to kill all processes in a freezer cgroup. cgroups::destroy will not
    complete until all processes have been reaped. A timeout is used for
    each step so destroy will eventually fail rather than constantly
    retrying.

    Added a test for destroying a freezer cgroup containing a stopped
    process.


Diffs (updated)
-----

  src/linux/cgroups.hpp 21d87a0783c2edd653d28fa89c59773200ae647e 
  src/linux/cgroups.cpp 142ac437d6d53b678ef284bda46444e1615ff0d1 
  src/slave/containerizer/isolators/cgroups/cpushare.cpp 3d253af51677dcb4dc48dc9e01bdc2ba80847da9 
  src/slave/containerizer/linux_launcher.cpp c17724b138de9d64856fb85db019e52043fbc7af 
  src/tests/cgroups_tests.cpp 5f674cd678e67f10bfef4620d927bb5af7c93753 

Diff: https://reviews.apache.org/r/20818/diff/


Testing
-------

make check # Linux


Thanks,

Ian Downes


Re: Review Request 20818: Refactored cgroups::destroy to use a single pass and to reap processes.

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20818/#review45058
-----------------------------------------------------------


Bad patch!

Reviews applied: [20818]

Failed command: git apply --index 20818.patch

Error:
 error: patch failed: src/linux/cgroups.cpp:1439
error: src/linux/cgroups.cpp: patch does not apply


- Mesos ReviewBot


On June 9, 2014, 4:15 a.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20818/
> -----------------------------------------------------------
> 
> (Updated June 9, 2014, 4:15 a.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Bugs: MESOS-759 and MESOS-976
>     https://issues.apache.org/jira/browse/MESOS-759
>     https://issues.apache.org/jira/browse/MESOS-976
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
>     internal::Destroyer now uses a single pass of freeze, kill, thaw, reap
>     to kill all processes in a freezer cgroup. cgroups::destroy will not
>     complete until all processes have been reaped. A timeout is used for
>     each step so destroy will eventually fail rather than constantly
>     retrying.
> 
>     Added a test for destroying a freezer cgroup containing a stopped
>     process.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 21d87a0783c2edd653d28fa89c59773200ae647e 
>   src/linux/cgroups.cpp 142ac437d6d53b678ef284bda46444e1615ff0d1 
>   src/slave/containerizer/isolators/cgroups/cpushare.cpp 3d253af51677dcb4dc48dc9e01bdc2ba80847da9 
>   src/slave/containerizer/linux_launcher.cpp c17724b138de9d64856fb85db019e52043fbc7af 
>   src/tests/cgroups_tests.cpp 5f674cd678e67f10bfef4620d927bb5af7c93753 
> 
> Diff: https://reviews.apache.org/r/20818/diff/
> 
> 
> Testing
> -------
> 
> make check # Linux
> 
> 
> Thanks,
> 
> Ian Downes
> 
>


Re: Review Request 20818: Refactored cgroups::destroy to use a single pass and to reap processes.

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



src/linux/cgroups.hpp
<https://reviews.apache.org/r/20818/#comment80388>

    Why this function is still here?



src/linux/cgroups.cpp
<https://reviews.apache.org/r/20818/#comment80389>

    I would prefer terminate the process immediately.



src/linux/cgroups.cpp
<https://reviews.apache.org/r/20818/#comment80395>

    Let's fail the promise here as 'future' is not expected to be discarded:
    
    promise.fail("Not expecting discarded future");
    terminate(self());
    return



src/linux/cgroups.cpp
<https://reviews.apache.org/r/20818/#comment80396>

    Ditto above. Let's move the logic to 'finalize'



src/linux/cgroups.cpp
<https://reviews.apache.org/r/20818/#comment80397>

    Ditto



src/linux/cgroups.cpp
<https://reviews.apache.org/r/20818/#comment80398>

    ditto.


- Jie Yu


On June 12, 2014, 5:24 p.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20818/
> -----------------------------------------------------------
> 
> (Updated June 12, 2014, 5:24 p.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Bugs: MESOS-759 and MESOS-976
>     https://issues.apache.org/jira/browse/MESOS-759
>     https://issues.apache.org/jira/browse/MESOS-976
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
>     internal::Destroyer now uses a single pass of freeze, kill, thaw, reap
>     to kill all processes in a freezer cgroup. cgroups::destroy will not
>     complete until all processes have been reaped. A timeout is used for
>     each step so destroy will eventually fail rather than constantly
>     retrying.
> 
>     Added a test for destroying a freezer cgroup containing a stopped
>     process.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 21d87a0783c2edd653d28fa89c59773200ae647e 
>   src/linux/cgroups.cpp 142ac437d6d53b678ef284bda46444e1615ff0d1 
>   src/slave/containerizer/isolators/cgroups/cpushare.cpp 3d253af51677dcb4dc48dc9e01bdc2ba80847da9 
>   src/slave/containerizer/linux_launcher.cpp c17724b138de9d64856fb85db019e52043fbc7af 
>   src/tests/cgroups_tests.cpp 5f674cd678e67f10bfef4620d927bb5af7c93753 
> 
> Diff: https://reviews.apache.org/r/20818/diff/
> 
> 
> Testing
> -------
> 
> make check # Linux
> 
> 
> Thanks,
> 
> Ian Downes
> 
>


Re: Review Request 20818: Refactored cgroups::destroy to use a single pass and to reap processes.

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20818/#review45587
-----------------------------------------------------------


Bad patch!

Reviews applied: [20817, 20818]

Failed command: ./support/mesos-style.py

Error:
 Checking 470 files using filter --filter=-,+build/class,+build/deprecated,+build/endif_comment,+runtime/vlog,+whitespace/blank_line,+whitespace/comma,+whitespace/ending_newline,+whitespace/forcolon,+whitespace/indent,+whitespace/line_length,+whitespace/tab,+whitespace/todo
src/linux/cgroups.cpp:1431:  Do not leave a blank line after "private:"  [whitespace/blank_line] [3]
Total errors found: 1


- Mesos ReviewBot


On June 12, 2014, 5:24 p.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20818/
> -----------------------------------------------------------
> 
> (Updated June 12, 2014, 5:24 p.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Bugs: MESOS-759 and MESOS-976
>     https://issues.apache.org/jira/browse/MESOS-759
>     https://issues.apache.org/jira/browse/MESOS-976
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
>     internal::Destroyer now uses a single pass of freeze, kill, thaw, reap
>     to kill all processes in a freezer cgroup. cgroups::destroy will not
>     complete until all processes have been reaped. A timeout is used for
>     each step so destroy will eventually fail rather than constantly
>     retrying.
> 
>     Added a test for destroying a freezer cgroup containing a stopped
>     process.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 21d87a0783c2edd653d28fa89c59773200ae647e 
>   src/linux/cgroups.cpp 142ac437d6d53b678ef284bda46444e1615ff0d1 
>   src/slave/containerizer/isolators/cgroups/cpushare.cpp 3d253af51677dcb4dc48dc9e01bdc2ba80847da9 
>   src/slave/containerizer/linux_launcher.cpp c17724b138de9d64856fb85db019e52043fbc7af 
>   src/tests/cgroups_tests.cpp 5f674cd678e67f10bfef4620d927bb5af7c93753 
> 
> Diff: https://reviews.apache.org/r/20818/diff/
> 
> 
> Testing
> -------
> 
> make check # Linux
> 
> 
> Thanks,
> 
> Ian Downes
> 
>


Re: Review Request 20818: Refactored cgroups::destroy to use a single pass and to reap processes.

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

Ship it!


Ship It!

- Jie Yu


On June 16, 2014, 9:58 p.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20818/
> -----------------------------------------------------------
> 
> (Updated June 16, 2014, 9:58 p.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Bugs: MESOS-759 and MESOS-976
>     https://issues.apache.org/jira/browse/MESOS-759
>     https://issues.apache.org/jira/browse/MESOS-976
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
>     internal::Destroyer now uses a single pass of freeze, kill, thaw, reap
>     to kill all processes in a freezer cgroup. cgroups::destroy will not
>     complete until all processes have been reaped. A timeout is used for
>     each step so destroy will eventually fail rather than constantly
>     retrying.
> 
>     Added a test for destroying a freezer cgroup containing a stopped
>     process.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 21d87a0783c2edd653d28fa89c59773200ae647e 
>   src/linux/cgroups.cpp 142ac437d6d53b678ef284bda46444e1615ff0d1 
>   src/slave/containerizer/isolators/cgroups/cpushare.cpp eb8933f4e37e09e52123b03890b6df952ceb6ec8 
>   src/slave/containerizer/linux_launcher.cpp c17724b138de9d64856fb85db019e52043fbc7af 
>   src/slave/containerizer/mesos_containerizer.cpp d6df9a1e41024102f3a63cda1b1868b641386172 
>   src/tests/cgroups_tests.cpp adcf46b1a4071b8f29475d2e20aae6dd8fdf09e7 
> 
> Diff: https://reviews.apache.org/r/20818/diff/
> 
> 
> Testing
> -------
> 
> make check # Linux
> 
> 
> Thanks,
> 
> Ian Downes
> 
>


Re: Review Request 20818: Refactored cgroups::destroy to use a single pass and to reap processes.

Posted by Ian Downes <ia...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20818/
-----------------------------------------------------------

(Updated June 16, 2014, 2:58 p.m.)


Review request for mesos and Jie Yu.


Bugs: MESOS-759 and MESOS-976
    https://issues.apache.org/jira/browse/MESOS-759
    https://issues.apache.org/jira/browse/MESOS-976


Repository: mesos-git


Description
-------

    internal::Destroyer now uses a single pass of freeze, kill, thaw, reap
    to kill all processes in a freezer cgroup. cgroups::destroy will not
    complete until all processes have been reaped. A timeout is used for
    each step so destroy will eventually fail rather than constantly
    retrying.

    Added a test for destroying a freezer cgroup containing a stopped
    process.


Diffs (updated)
-----

  src/linux/cgroups.hpp 21d87a0783c2edd653d28fa89c59773200ae647e 
  src/linux/cgroups.cpp 142ac437d6d53b678ef284bda46444e1615ff0d1 
  src/slave/containerizer/isolators/cgroups/cpushare.cpp eb8933f4e37e09e52123b03890b6df952ceb6ec8 
  src/slave/containerizer/linux_launcher.cpp c17724b138de9d64856fb85db019e52043fbc7af 
  src/slave/containerizer/mesos_containerizer.cpp d6df9a1e41024102f3a63cda1b1868b641386172 
  src/tests/cgroups_tests.cpp adcf46b1a4071b8f29475d2e20aae6dd8fdf09e7 

Diff: https://reviews.apache.org/r/20818/diff/


Testing
-------

make check # Linux


Thanks,

Ian Downes


Re: Review Request 20818: Refactored cgroups::destroy to use a single pass and to reap processes.

Posted by Ian Downes <ia...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20818/
-----------------------------------------------------------

(Updated June 12, 2014, 10:24 a.m.)


Review request for mesos and Jie Yu.


Bugs: MESOS-759 and MESOS-976
    https://issues.apache.org/jira/browse/MESOS-759
    https://issues.apache.org/jira/browse/MESOS-976


Repository: mesos-git


Description
-------

    internal::Destroyer now uses a single pass of freeze, kill, thaw, reap
    to kill all processes in a freezer cgroup. cgroups::destroy will not
    complete until all processes have been reaped. A timeout is used for
    each step so destroy will eventually fail rather than constantly
    retrying.

    Added a test for destroying a freezer cgroup containing a stopped
    process.


Diffs
-----

  src/linux/cgroups.hpp 21d87a0783c2edd653d28fa89c59773200ae647e 
  src/linux/cgroups.cpp 142ac437d6d53b678ef284bda46444e1615ff0d1 
  src/slave/containerizer/isolators/cgroups/cpushare.cpp 3d253af51677dcb4dc48dc9e01bdc2ba80847da9 
  src/slave/containerizer/linux_launcher.cpp c17724b138de9d64856fb85db019e52043fbc7af 
  src/tests/cgroups_tests.cpp 5f674cd678e67f10bfef4620d927bb5af7c93753 

Diff: https://reviews.apache.org/r/20818/diff/


Testing
-------

make check # Linux


Thanks,

Ian Downes


Re: Review Request 20818: Refactored cgroups::destroy to use a single pass and to reap processes.

Posted by Mesos ReviewBot <de...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20818/#review45509
-----------------------------------------------------------


Bad patch!

Reviews applied: [20818]

Failed command: git apply --index 20818.patch

Error:
 error: patch failed: src/linux/cgroups.hpp:41
error: src/linux/cgroups.hpp: patch does not apply
error: patch failed: src/linux/cgroups.cpp:1435
error: src/linux/cgroups.cpp: patch does not apply


- Mesos ReviewBot


On June 11, 2014, 10:21 p.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20818/
> -----------------------------------------------------------
> 
> (Updated June 11, 2014, 10:21 p.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Bugs: MESOS-759 and MESOS-976
>     https://issues.apache.org/jira/browse/MESOS-759
>     https://issues.apache.org/jira/browse/MESOS-976
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
>     internal::Destroyer now uses a single pass of freeze, kill, thaw, reap
>     to kill all processes in a freezer cgroup. cgroups::destroy will not
>     complete until all processes have been reaped. A timeout is used for
>     each step so destroy will eventually fail rather than constantly
>     retrying.
> 
>     Added a test for destroying a freezer cgroup containing a stopped
>     process.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 21d87a0783c2edd653d28fa89c59773200ae647e 
>   src/linux/cgroups.cpp 142ac437d6d53b678ef284bda46444e1615ff0d1 
>   src/slave/containerizer/isolators/cgroups/cpushare.cpp 3d253af51677dcb4dc48dc9e01bdc2ba80847da9 
>   src/slave/containerizer/linux_launcher.cpp c17724b138de9d64856fb85db019e52043fbc7af 
>   src/tests/cgroups_tests.cpp 5f674cd678e67f10bfef4620d927bb5af7c93753 
> 
> Diff: https://reviews.apache.org/r/20818/diff/
> 
> 
> Testing
> -------
> 
> make check # Linux
> 
> 
> Thanks,
> 
> Ian Downes
> 
>


Re: Review Request 20818: Refactored cgroups::destroy to use a single pass and to reap processes.

Posted by Ian Downes <ia...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20818/
-----------------------------------------------------------

(Updated June 11, 2014, 3:21 p.m.)


Review request for mesos and Jie Yu.


Changes
-------

Terminate immediately on discard.


Bugs: MESOS-759 and MESOS-976
    https://issues.apache.org/jira/browse/MESOS-759
    https://issues.apache.org/jira/browse/MESOS-976


Repository: mesos-git


Description
-------

    internal::Destroyer now uses a single pass of freeze, kill, thaw, reap
    to kill all processes in a freezer cgroup. cgroups::destroy will not
    complete until all processes have been reaped. A timeout is used for
    each step so destroy will eventually fail rather than constantly
    retrying.

    Added a test for destroying a freezer cgroup containing a stopped
    process.


Diffs (updated)
-----

  src/linux/cgroups.hpp 21d87a0783c2edd653d28fa89c59773200ae647e 
  src/linux/cgroups.cpp 142ac437d6d53b678ef284bda46444e1615ff0d1 
  src/slave/containerizer/isolators/cgroups/cpushare.cpp 3d253af51677dcb4dc48dc9e01bdc2ba80847da9 
  src/slave/containerizer/linux_launcher.cpp c17724b138de9d64856fb85db019e52043fbc7af 
  src/tests/cgroups_tests.cpp 5f674cd678e67f10bfef4620d927bb5af7c93753 

Diff: https://reviews.apache.org/r/20818/diff/


Testing
-------

make check # Linux


Thanks,

Ian Downes


Re: Review Request 20818: Refactored cgroups::destroy to use a single pass and to reap processes.

Posted by Ian Downes <ia...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20818/
-----------------------------------------------------------

(Updated June 11, 2014, 10:27 a.m.)


Review request for mesos and Jie Yu.


Changes
-------

Added depends on.


Bugs: MESOS-759 and MESOS-976
    https://issues.apache.org/jira/browse/MESOS-759
    https://issues.apache.org/jira/browse/MESOS-976


Repository: mesos-git


Description
-------

    internal::Destroyer now uses a single pass of freeze, kill, thaw, reap
    to kill all processes in a freezer cgroup. cgroups::destroy will not
    complete until all processes have been reaped. A timeout is used for
    each step so destroy will eventually fail rather than constantly
    retrying.

    Added a test for destroying a freezer cgroup containing a stopped
    process.


Diffs
-----

  src/linux/cgroups.hpp 21d87a0783c2edd653d28fa89c59773200ae647e 
  src/linux/cgroups.cpp 142ac437d6d53b678ef284bda46444e1615ff0d1 
  src/slave/containerizer/isolators/cgroups/cpushare.cpp 3d253af51677dcb4dc48dc9e01bdc2ba80847da9 
  src/slave/containerizer/linux_launcher.cpp c17724b138de9d64856fb85db019e52043fbc7af 
  src/tests/cgroups_tests.cpp 5f674cd678e67f10bfef4620d927bb5af7c93753 

Diff: https://reviews.apache.org/r/20818/diff/


Testing
-------

make check # Linux


Thanks,

Ian Downes