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/04/29 01:42:27 UTC

Re: Review Request 20026: Support optional container set up commands.

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

(Updated April 28, 2014, 11:42 p.m.)


Review request for mesos, Benjamin Hindman, Chi Zhang, Jie Yu, Vinod Kone, and Cong Wang.


Changes
-------

Rebased.

Split changes to the Linux launcher into an additional review.


Summary (updated)
-----------------

Support optional container set up commands.


Repository: mesos-git


Description (updated)
-------

Modified Isolator API so optional commands are returned from prepare and run in the child before exec'ing the executor.


Diffs (updated)
-----

  src/slave/containerizer/isolator.hpp d410c73c5feac9cbd391b7a2b66141aa9aa75423 
  src/slave/containerizer/isolator.cpp f7935b3f20530e9c5558a636f40d69371a963102 
  src/slave/containerizer/isolators/cgroups/cpushare.hpp 49cc5bc2407e99c81e0a8eaff11cffd1136b019c 
  src/slave/containerizer/isolators/cgroups/cpushare.cpp 11665dbe88e3920fd9d8a2259987611d49e85462 
  src/slave/containerizer/isolators/cgroups/mem.hpp ffd81b330202ad6eff48940b762e3f7105008b4b 
  src/slave/containerizer/isolators/cgroups/mem.cpp 9e9c55e37f499898196b61cc586cb0e49feabf56 
  src/slave/containerizer/isolators/posix.hpp 7fbc6ddd9aa5518870bf938c6ead5eb72d3ec524 
  src/slave/containerizer/launcher.hpp dee526f254d56a7a974a70522cd0ca059814fb6d 
  src/slave/containerizer/launcher.cpp c83327b2f13f0511c8e4e0e9902bc6a1e1328283 
  src/slave/containerizer/mesos_containerizer.hpp 99c1354366b3fc99f57773aeb3beece6c6544da2 
  src/slave/containerizer/mesos_containerizer.cpp 27813af2c132e094a26a4aa31929d7aa84ddd969 
  src/tests/containerizer_tests.cpp cea58cd8291201fa2dfcb934bfe371ddecdd1cc2 
  src/tests/isolator.hpp PRE-CREATION 

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


Testing
-------

make check


Thanks,

Ian Downes


Re: Review Request 20026: Support optional container set up commands.

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

Ship it!


Great tests! LGTM.


src/slave/containerizer/isolator.hpp
<https://reviews.apache.org/r/20026/#comment75288>

    The environment is also ignored, right? Do we plan to support environment in the future? If yes, maybe a TODO is more appropriate.



src/slave/containerizer/mesos_containerizer.cpp
<https://reviews.apache.org/r/20026/#comment75290>

    In fact, anything involving Try (thus new operator) is not async signal safe. Maybe a TODO here. We should avoid using stout/os functions in child context unless they are made async signal safe (like os::system).



src/slave/containerizer/mesos_containerizer.cpp
<https://reviews.apache.org/r/20026/#comment75281>

    Kill the new line here.



src/tests/containerizer_tests.cpp
<https://reviews.apache.org/r/20026/#comment75297>

    protected?



src/tests/containerizer_tests.cpp
<https://reviews.apache.org/r/20026/#comment75299>

    Get rid of std:: here and everywhere else.


- Jie Yu


On April 28, 2014, 11:42 p.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20026/
> -----------------------------------------------------------
> 
> (Updated April 28, 2014, 11:42 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Chi Zhang, Jie Yu, Vinod Kone, and Cong Wang.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Modified Isolator API so optional commands are returned from prepare and run in the child before exec'ing the executor.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/isolator.hpp d410c73c5feac9cbd391b7a2b66141aa9aa75423 
>   src/slave/containerizer/isolator.cpp f7935b3f20530e9c5558a636f40d69371a963102 
>   src/slave/containerizer/isolators/cgroups/cpushare.hpp 49cc5bc2407e99c81e0a8eaff11cffd1136b019c 
>   src/slave/containerizer/isolators/cgroups/cpushare.cpp 11665dbe88e3920fd9d8a2259987611d49e85462 
>   src/slave/containerizer/isolators/cgroups/mem.hpp ffd81b330202ad6eff48940b762e3f7105008b4b 
>   src/slave/containerizer/isolators/cgroups/mem.cpp 9e9c55e37f499898196b61cc586cb0e49feabf56 
>   src/slave/containerizer/isolators/posix.hpp 7fbc6ddd9aa5518870bf938c6ead5eb72d3ec524 
>   src/slave/containerizer/launcher.hpp dee526f254d56a7a974a70522cd0ca059814fb6d 
>   src/slave/containerizer/launcher.cpp c83327b2f13f0511c8e4e0e9902bc6a1e1328283 
>   src/slave/containerizer/mesos_containerizer.hpp 99c1354366b3fc99f57773aeb3beece6c6544da2 
>   src/slave/containerizer/mesos_containerizer.cpp 27813af2c132e094a26a4aa31929d7aa84ddd969 
>   src/tests/containerizer_tests.cpp cea58cd8291201fa2dfcb934bfe371ddecdd1cc2 
>   src/tests/isolator.hpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/20026/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Ian Downes
> 
>


Re: Review Request 20026: Support optional container set up commands.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20026/#review41735
-----------------------------------------------------------

Ship it!



src/slave/containerizer/isolators/cgroups/cpushare.cpp
<https://reviews.apache.org/r/20026/#comment75328>

    no need for ";" at the end.
    
    also, why prefix with "_". have we used this style before?



src/slave/containerizer/isolators/cgroups/mem.cpp
<https://reviews.apache.org/r/20026/#comment75329>

    ditto.



src/slave/containerizer/mesos_containerizer.cpp
<https://reviews.apache.org/r/20026/#comment75322>

    s/scripts/commands/ ?
    
    I'm assuming these needn't always be scripts?



src/slave/containerizer/mesos_containerizer.cpp
<https://reviews.apache.org/r/20026/#comment75323>

    Include the script (or command) name here to make it easy to debug?



src/slave/containerizer/mesos_containerizer.cpp
<https://reviews.apache.org/r/20026/#comment75324>

    s/inChild/childFunction/ to be consistent with the param name?



src/tests/containerizer_tests.cpp
<https://reviews.apache.org/r/20026/#comment75332>

    why the change in brace type?



src/tests/containerizer_tests.cpp
<https://reviews.apache.org/r/20026/#comment75335>

    move this to tests/mesos.hpp?


- Vinod Kone


On April 29, 2014, 6:24 p.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20026/
> -----------------------------------------------------------
> 
> (Updated April 29, 2014, 6:24 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Chi Zhang, Jie Yu, Vinod Kone, and Cong Wang.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Modified Isolator API so optional commands are returned from prepare and run in the child before exec'ing the executor.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/isolator.hpp d410c73c5feac9cbd391b7a2b66141aa9aa75423 
>   src/slave/containerizer/isolator.cpp f7935b3f20530e9c5558a636f40d69371a963102 
>   src/slave/containerizer/isolators/cgroups/cpushare.hpp 49cc5bc2407e99c81e0a8eaff11cffd1136b019c 
>   src/slave/containerizer/isolators/cgroups/cpushare.cpp 11665dbe88e3920fd9d8a2259987611d49e85462 
>   src/slave/containerizer/isolators/cgroups/mem.hpp ffd81b330202ad6eff48940b762e3f7105008b4b 
>   src/slave/containerizer/isolators/cgroups/mem.cpp 9e9c55e37f499898196b61cc586cb0e49feabf56 
>   src/slave/containerizer/isolators/posix.hpp 7fbc6ddd9aa5518870bf938c6ead5eb72d3ec524 
>   src/slave/containerizer/launcher.hpp dee526f254d56a7a974a70522cd0ca059814fb6d 
>   src/slave/containerizer/launcher.cpp c83327b2f13f0511c8e4e0e9902bc6a1e1328283 
>   src/slave/containerizer/mesos_containerizer.hpp 9be1b67f6afc63f275474b091a2df55d38cf032f 
>   src/slave/containerizer/mesos_containerizer.cpp 2c64f2d70251b154fb023c152a2dea4575c409a4 
>   src/tests/containerizer_tests.cpp cea58cd8291201fa2dfcb934bfe371ddecdd1cc2 
>   src/tests/isolator.hpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/20026/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Ian Downes
> 
>


Re: Review Request 20026: Support optional container set up commands.

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

(Updated April 29, 2014, 11:24 a.m.)


Review request for mesos, Benjamin Hindman, Chi Zhang, Jie Yu, Vinod Kone, and Cong Wang.


Changes
-------

Rebased and addressed Jie's comments.


Repository: mesos-git


Description
-------

Modified Isolator API so optional commands are returned from prepare and run in the child before exec'ing the executor.


Diffs (updated)
-----

  src/slave/containerizer/isolator.hpp d410c73c5feac9cbd391b7a2b66141aa9aa75423 
  src/slave/containerizer/isolator.cpp f7935b3f20530e9c5558a636f40d69371a963102 
  src/slave/containerizer/isolators/cgroups/cpushare.hpp 49cc5bc2407e99c81e0a8eaff11cffd1136b019c 
  src/slave/containerizer/isolators/cgroups/cpushare.cpp 11665dbe88e3920fd9d8a2259987611d49e85462 
  src/slave/containerizer/isolators/cgroups/mem.hpp ffd81b330202ad6eff48940b762e3f7105008b4b 
  src/slave/containerizer/isolators/cgroups/mem.cpp 9e9c55e37f499898196b61cc586cb0e49feabf56 
  src/slave/containerizer/isolators/posix.hpp 7fbc6ddd9aa5518870bf938c6ead5eb72d3ec524 
  src/slave/containerizer/launcher.hpp dee526f254d56a7a974a70522cd0ca059814fb6d 
  src/slave/containerizer/launcher.cpp c83327b2f13f0511c8e4e0e9902bc6a1e1328283 
  src/slave/containerizer/mesos_containerizer.hpp 9be1b67f6afc63f275474b091a2df55d38cf032f 
  src/slave/containerizer/mesos_containerizer.cpp 2c64f2d70251b154fb023c152a2dea4575c409a4 
  src/tests/containerizer_tests.cpp cea58cd8291201fa2dfcb934bfe371ddecdd1cc2 
  src/tests/isolator.hpp PRE-CREATION 

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


Testing
-------

make check


Thanks,

Ian Downes