You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Qian Zhang <zh...@gmail.com> on 2020/04/21 13:20:16 UTC

Review Request 72401: Updated Docker containerizer by not updating resources for command task.

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

Review request for mesos, Andrei Budnik and Greg Mann.


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


Repository: mesos


Description
-------

Updated Docker containerizer by not updating resources for command task.


Diffs
-----

  src/slave/containerizer/docker.hpp 09fc2795289e1292134b7d4bb2cc079c80d91c3d 
  src/slave/containerizer/docker.cpp 492ac273fafb55d3e4c90d70fbf9c8c0c4fe7e70 


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


Testing
-------


Thanks,

Qian Zhang


Re: Review Request 72401: Updated Docker containerizer by not updating resources for command task.

Posted by Qian Zhang <zh...@gmail.com>.

> On April 29, 2020, 3:14 a.m., Greg Mann wrote:
> > Could you update the description of the patch to describe the difference between the two cases of a command task and a task with a Docker executor container?

Updated.


> On April 29, 2020, 3:14 a.m., Greg Mann wrote:
> > src/slave/containerizer/docker.hpp
> > Lines 357 (patched)
> > <https://reviews.apache.org/r/72401/diff/2/?file=2224720#file2224720line357>
> >
> >     Nit: you could use the `? :` ternary operator to initialize `generatedForCommandTask` here in the initializer list, I don't think it matters too much but it might be more readable if somebody just glances at the initializer list to see what the value is initialized to.

Fixed.


- Qian


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


On April 29, 2020, 8:07 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72401/
> -----------------------------------------------------------
> 
> (Updated April 29, 2020, 8:07 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Greg Mann.
> 
> 
> Bugs: MESOS-8877
>     https://issues.apache.org/jira/browse/MESOS-8877
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> For command task, its resources will be set when it is launched as a Docker
> container by Docker executor, and we do not need to update its resources
> afterward since we do not support task resizing. But for the case that a
> custom executor launched as a Docker container by Docker containerizer, we
> need to update its resources when it launches a new task or an existing task
> terminates.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/docker.hpp 09fc2795289e1292134b7d4bb2cc079c80d91c3d 
>   src/slave/containerizer/docker.cpp 492ac273fafb55d3e4c90d70fbf9c8c0c4fe7e70 
>   src/tests/containerizer/docker_containerizer_tests.cpp b069f518d51225c39f0cd5126c02fa08674566ab 
> 
> 
> Diff: https://reviews.apache.org/r/72401/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 72401: Updated Docker containerizer by not updating resources for command task.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72401/#review220529
-----------------------------------------------------------



Could you update the description of the patch to describe the difference between the two cases of a command task and a task with a Docker executor container?


src/slave/containerizer/docker.hpp
Lines 357 (patched)
<https://reviews.apache.org/r/72401/#comment309012>

    Nit: you could use the `? :` ternary operator to initialize `generatedForCommandTask` here in the initializer list, I don't think it matters too much but it might be more readable if somebody just glances at the initializer list to see what the value is initialized to.


- Greg Mann


On April 22, 2020, 8:33 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72401/
> -----------------------------------------------------------
> 
> (Updated April 22, 2020, 8:33 a.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Greg Mann.
> 
> 
> Bugs: MESOS-8877
>     https://issues.apache.org/jira/browse/MESOS-8877
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Updated Docker containerizer by not updating resources for command task.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/docker.hpp 09fc2795289e1292134b7d4bb2cc079c80d91c3d 
>   src/slave/containerizer/docker.cpp 492ac273fafb55d3e4c90d70fbf9c8c0c4fe7e70 
>   src/tests/containerizer/docker_containerizer_tests.cpp b069f518d51225c39f0cd5126c02fa08674566ab 
> 
> 
> Diff: https://reviews.apache.org/r/72401/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 72401: Updated Docker containerizer by not updating resources for command task.

Posted by Greg Mann <gr...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72401/#review220567
-----------------------------------------------------------


Ship it!




Ship It!

- Greg Mann


On April 29, 2020, 12:07 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72401/
> -----------------------------------------------------------
> 
> (Updated April 29, 2020, 12:07 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Greg Mann.
> 
> 
> Bugs: MESOS-8877
>     https://issues.apache.org/jira/browse/MESOS-8877
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> For command task, its resources will be set when it is launched as a Docker
> container by Docker executor, and we do not need to update its resources
> afterward since we do not support task resizing. But for the case that a
> custom executor launched as a Docker container by Docker containerizer, we
> need to update its resources when it launches a new task or an existing task
> terminates.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/docker.hpp 09fc2795289e1292134b7d4bb2cc079c80d91c3d 
>   src/slave/containerizer/docker.cpp 492ac273fafb55d3e4c90d70fbf9c8c0c4fe7e70 
>   src/tests/containerizer/docker_containerizer_tests.cpp b069f518d51225c39f0cd5126c02fa08674566ab 
> 
> 
> Diff: https://reviews.apache.org/r/72401/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Re: Review Request 72401: Updated Docker containerizer by not updating resources for command task.

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

(Updated April 29, 2020, 8:07 p.m.)


Review request for mesos, Andrei Budnik and Greg Mann.


Changes
-------

Addressed review comments.


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


Repository: mesos


Description (updated)
-------

For command task, its resources will be set when it is launched as a Docker
container by Docker executor, and we do not need to update its resources
afterward since we do not support task resizing. But for the case that a
custom executor launched as a Docker container by Docker containerizer, we
need to update its resources when it launches a new task or an existing task
terminates.


Diffs (updated)
-----

  src/slave/containerizer/docker.hpp 09fc2795289e1292134b7d4bb2cc079c80d91c3d 
  src/slave/containerizer/docker.cpp 492ac273fafb55d3e4c90d70fbf9c8c0c4fe7e70 
  src/tests/containerizer/docker_containerizer_tests.cpp b069f518d51225c39f0cd5126c02fa08674566ab 


Diff: https://reviews.apache.org/r/72401/diff/3/

Changes: https://reviews.apache.org/r/72401/diff/2-3/


Testing
-------


Thanks,

Qian Zhang


Re: Review Request 72401: Updated Docker containerizer by not updating resources for command task.

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

(Updated April 22, 2020, 4:33 p.m.)


Review request for mesos, Andrei Budnik and Greg Mann.


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


Repository: mesos


Description
-------

Updated Docker containerizer by not updating resources for command task.


Diffs
-----

  src/slave/containerizer/docker.hpp 09fc2795289e1292134b7d4bb2cc079c80d91c3d 
  src/slave/containerizer/docker.cpp 492ac273fafb55d3e4c90d70fbf9c8c0c4fe7e70 
  src/tests/containerizer/docker_containerizer_tests.cpp b069f518d51225c39f0cd5126c02fa08674566ab 


Diff: https://reviews.apache.org/r/72401/diff/2/


Testing
-------


Thanks,

Qian Zhang


Re: Review Request 72401: Updated Docker containerizer by not updating resources for command task.

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

(Updated April 22, 2020, 4:06 p.m.)


Review request for mesos, Andrei Budnik and Greg Mann.


Changes
-------

Removed the test `DockerContainerizerTest, ROOT_DOCKER_Update`.


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


Repository: mesos


Description
-------

Updated Docker containerizer by not updating resources for command task.


Diffs (updated)
-----

  src/slave/containerizer/docker.hpp 09fc2795289e1292134b7d4bb2cc079c80d91c3d 
  src/slave/containerizer/docker.cpp 492ac273fafb55d3e4c90d70fbf9c8c0c4fe7e70 
  src/tests/containerizer/docker_containerizer_tests.cpp b069f518d51225c39f0cd5126c02fa08674566ab 


Diff: https://reviews.apache.org/r/72401/diff/2/

Changes: https://reviews.apache.org/r/72401/diff/1-2/


Testing
-------


Thanks,

Qian Zhang