[
https://issues.apache.org/jira/browse/MESOS-7947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16553625#comment-16553625
]
Joseph Wu commented on MESOS-7947:
----------------------------------
In terms of GC-ing container sandboxes created via the LAUNCH_CONTAINER APIs, I
think it will be relatively neat to pass the Agent's GarbageCollector to the
Containerizer. The Containerizer is the one with direct access to the sandbox
directories (held within the checkpointed {{ContainerConfig}} protobufs) and
can schedule GC whenever a container exits, or during recovery. In future, if
we provide a GCPolicy, that information would presumably be checkpointed into
the {{ContainerConfig}} too; so it would be better to give the Containerizer
access to the GarbageCollector.
This implementation should cover both nested containers and standalone
containers. And it would protect against the case where the user/executor
forgets to call REMOVE_CONTAINER.
For now, the plan is to defer making framework changes. Instead of adding a
boolean or protobuf GCPolicy, I'll add an agent flag to tell the agent to GC
non-executor sandboxes by default. I don't have a nice name for this flag yet
(currently {{--gc_non_executor_container_sandboxes}}.
---
Additionally, since the default executor (and custom executors) can be
long-lived and run many tasks in its lifetime, we'll need to prune some of the
Task metadata. This is limited to directories like
{{<WorkDir>/meta/slaves/<SlaveID>/frameworks/<FrameworkID>/executors/<ExecutorID>/runs/<ContainerID>/tasks/<TaskID>}}.
This metadata GC will happen for all tasks, and frameworks shouldn't need to
change how this works.
> Add GC capability to nested containers
> --------------------------------------
>
> Key: MESOS-7947
> URL: https://issues.apache.org/jira/browse/MESOS-7947
> Project: Mesos
> Issue Type: Improvement
> Components: executor
> Reporter: Chun-Hung Hsiao
> Assignee: Joseph Wu
> Priority: Major
>
> We should extend the existing API or add a new API for nested containers for
> an executor to tell the Mesos agent that a nested container is no longer
> needed and can be scheduled for GC.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)