----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51052/#review153030 -----------------------------------------------------------
src/docker/docker.hpp (line 51) <https://reviews.apache.org/r/51052/#comment222266> Having this as a global knob sounds really weird to me. I know you want to work around the Docker::run GMock issue. But this is too weird to me. That means we cannot have per docker container cfs control (i.e., some container uses cfs while some doesn't) src/docker/docker.cpp (lines 499 - 500) <https://reviews.apache.org/r/51052/#comment222268> Maybe as a work around, you can combine these two: ``` struct Stdio { Subprocess::IO out; Subprocess::IO err; }; Future<Option<int>> Docker::run( ... const Stdio& stdio) const ``` - Jie Yu On Oct. 12, 2016, 5:02 p.m., Zhitao Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51052/ > ----------------------------------------------------------- > > (Updated Oct. 12, 2016, 5:02 p.m.) > > > Review request for mesos, Gilbert Song, haosdent huang, and Jie Yu. > > > Bugs: MESOS-6134 > https://issues.apache.org/jira/browse/MESOS-6134 > > > Repository: mesos > > > Description > ------- > > This fixes cpu quota for command executor (which runs outside > of the docker container) by ensuing --cpu-quota flag to docker > run. > > Note: we have to add the boolean variable to `Docker` class > because `Docker::run()` has reached the maximum argument length > GMOCK can support. > > > Diffs > ----- > > src/docker/docker.hpp 9093371afc8ea792ba94f61c6875703e547ea6b0 > src/docker/docker.cpp 50fda393a42afefc70790a26b44911e4cf17185e > src/docker/executor.hpp a49ec1b4045116741af6af08578791fb0440ad8f > src/docker/executor.cpp ab3f0473fdc9105d1c425f0dbe7b81c566d541e8 > src/slave/containerizer/docker.cpp d71386089bf7677872bcb1bd36e07da9263dcf0d > src/tests/mock_docker.cpp 6a0e613bde6889864a37ffd7ec0b454e5fe4df1c > > Diff: https://reviews.apache.org/r/51052/diff/ > > > Testing > ------- > > I am now able to make docker containers launched through mesos-execute have a > cpu quota. > > Also making sure `make check` still works on mac os for the linux only flag. > > > Thanks, > > Zhitao Li > >
