You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Joseph Wu <jo...@mesosphere.io> on 2018/07/28 00:22:22 UTC
Review Request 68095: Modified MesosContainerizer to GC nested
container sandboxes.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68095/
-----------------------------------------------------------
Review request for mesos, Gilbert Song and Qian Zhang.
Bugs: MESOS-7947
https://issues.apache.org/jira/browse/MESOS-7947
Repository: mesos
Description
-------
When the --gc_non_executor_container_sandboxes agent flag is enabled,
this commit changes the MesosContainerizer to schedule nested container
sandboxes for garbage collection. The GC policy is the same between
the MesosContainerizer and the Agent.
Diffs
-----
src/slave/containerizer/mesos/containerizer.hpp 7711d463c8ed92e2580c56e88d7f372c6dfaeb2b
src/slave/containerizer/mesos/containerizer.cpp 98129d006cda9b65804b518619b6addc8990410a
Diff: https://reviews.apache.org/r/68095/diff/1/
Testing
-------
See last patch in chain.
Thanks,
Joseph Wu
Re: Review Request 68095: Modified MesosContainerizer to GC nested
container sandboxes.
Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68095/#review206906
-----------------------------------------------------------
Issues spotted while doing some manual testing:
src/slave/containerizer/mesos/containerizer.hpp
Lines 54-59 (original), 54-59 (patched)
<https://reviews.apache.org/r/68095/#comment290031>
It may be necessary to suppress certain log messages in the GC actor. Health checks launched via nested containers will also have their sandboxes scheduled for GC, which results in at least one log message per directory.
We could also consider avoiding scheduling health check nested containers for GC.
src/slave/containerizer/mesos/containerizer.cpp
Lines 2769-2770 (original), 2829-2830 (patched)
<https://reviews.apache.org/r/68095/#comment290032>
Need to unschedule directories for GC when they are removed. It's possible that ContainerIDs will be reused after removal, and if we don't unschedule, a reused ContainerID/sandbox could be GC'd while it is in use.
- Joseph Wu
On July 27, 2018, 5:22 p.m., Joseph Wu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68095/
> -----------------------------------------------------------
>
> (Updated July 27, 2018, 5:22 p.m.)
>
>
> Review request for mesos, Gilbert Song and Qian Zhang.
>
>
> Bugs: MESOS-7947
> https://issues.apache.org/jira/browse/MESOS-7947
>
>
> Repository: mesos
>
>
> Description
> -------
>
> When the --gc_non_executor_container_sandboxes agent flag is enabled,
> this commit changes the MesosContainerizer to schedule nested container
> sandboxes for garbage collection. The GC policy is the same between
> the MesosContainerizer and the Agent.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/containerizer.hpp 7711d463c8ed92e2580c56e88d7f372c6dfaeb2b
> src/slave/containerizer/mesos/containerizer.cpp 98129d006cda9b65804b518619b6addc8990410a
>
>
> Diff: https://reviews.apache.org/r/68095/diff/1/
>
>
> Testing
> -------
>
> See last patch in chain.
>
>
> Thanks,
>
> Joseph Wu
>
>
Re: Review Request 68095: Modified MesosContainerizer to GC nested
container sandboxes.
Posted by Qian Zhang <zh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68095/#review206578
-----------------------------------------------------------
src/slave/containerizer/mesos/containerizer.cpp
Lines 906 (patched)
<https://reviews.apache.org/r/68095/#comment289568>
s/sandboxes/sandbox/
src/slave/containerizer/mesos/containerizer.cpp
Lines 910-912 (patched)
<https://reviews.apache.org/r/68095/#comment289569>
Do we really need `containerId.has_parent()` here? I think the file `terminationPath` existing means this must be a nested container since we create `TERMINATION_FILE` only for nested container. So maybe this should be a check (`CHECK(containerId.has_parent())`)?
src/slave/containerizer/mesos/containerizer.cpp
Lines 916 (patched)
<https://reviews.apache.org/r/68095/#comment289570>
Do we need to make sure `directory` exists before gc it? Otherwise, we may gc the same dir again even after it has been removed by gc.
src/slave/containerizer/mesos/containerizer.cpp
Lines 2743-2753 (patched)
<https://reviews.apache.org/r/68095/#comment289571>
Can we merge these code into the above `if (containerId.has_parent()) {`?
- Qian Zhang
On July 28, 2018, 8:22 a.m., Joseph Wu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68095/
> -----------------------------------------------------------
>
> (Updated July 28, 2018, 8:22 a.m.)
>
>
> Review request for mesos, Gilbert Song and Qian Zhang.
>
>
> Bugs: MESOS-7947
> https://issues.apache.org/jira/browse/MESOS-7947
>
>
> Repository: mesos
>
>
> Description
> -------
>
> When the --gc_non_executor_container_sandboxes agent flag is enabled,
> this commit changes the MesosContainerizer to schedule nested container
> sandboxes for garbage collection. The GC policy is the same between
> the MesosContainerizer and the Agent.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/containerizer.hpp 7711d463c8ed92e2580c56e88d7f372c6dfaeb2b
> src/slave/containerizer/mesos/containerizer.cpp 98129d006cda9b65804b518619b6addc8990410a
>
>
> Diff: https://reviews.apache.org/r/68095/diff/1/
>
>
> Testing
> -------
>
> See last patch in chain.
>
>
> Thanks,
>
> Joseph Wu
>
>
Re: Review Request 68095: Modified MesosContainerizer to GC nested
container sandboxes.
Posted by Qian Zhang <zh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68095/#review208237
-----------------------------------------------------------
Ship it!
Ship It!
- Qian Zhang
On Aug. 23, 2018, 2:33 a.m., Joseph Wu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68095/
> -----------------------------------------------------------
>
> (Updated Aug. 23, 2018, 2:33 a.m.)
>
>
> Review request for mesos, Gilbert Song and Qian Zhang.
>
>
> Bugs: MESOS-7947
> https://issues.apache.org/jira/browse/MESOS-7947
>
>
> Repository: mesos
>
>
> Description
> -------
>
> When the --gc_non_executor_container_sandboxes agent flag is enabled,
> this commit changes the MesosContainerizer to schedule nested container
> sandboxes for garbage collection. The GC policy is the same between
> the MesosContainerizer and the Agent.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/containerizer.hpp 7711d463c8ed92e2580c56e88d7f372c6dfaeb2b
> src/slave/containerizer/mesos/containerizer.cpp c38bfacef6a0c8e3b8703c64b40d6d428c9013fe
>
>
> Diff: https://reviews.apache.org/r/68095/diff/2/
>
>
> Testing
> -------
>
> See last patch in chain.
>
>
> Thanks,
>
> Joseph Wu
>
>
Re: Review Request 68095: Modified MesosContainerizer to GC nested
container sandboxes.
Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68095/
-----------------------------------------------------------
(Updated Aug. 22, 2018, 11:33 a.m.)
Review request for mesos, Gilbert Song and Qian Zhang.
Changes
-------
Rebase and various tweaks to address comments.
Bugs: MESOS-7947
https://issues.apache.org/jira/browse/MESOS-7947
Repository: mesos
Description
-------
When the --gc_non_executor_container_sandboxes agent flag is enabled,
this commit changes the MesosContainerizer to schedule nested container
sandboxes for garbage collection. The GC policy is the same between
the MesosContainerizer and the Agent.
Diffs (updated)
-----
src/slave/containerizer/mesos/containerizer.hpp 7711d463c8ed92e2580c56e88d7f372c6dfaeb2b
src/slave/containerizer/mesos/containerizer.cpp c38bfacef6a0c8e3b8703c64b40d6d428c9013fe
Diff: https://reviews.apache.org/r/68095/diff/2/
Changes: https://reviews.apache.org/r/68095/diff/1-2/
Testing
-------
See last patch in chain.
Thanks,
Joseph Wu