-
Notifications
You must be signed in to change notification settings - Fork 3.8k
sandbox: add sandboxedTask other than shimTask in runtime #9884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @abel-von. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
50df0d3 to
4e4c50e
Compare
4e4c50e to
ffec174
Compare
ffec174 to
f317e5d
Compare
|
/ok-to-test |
f317e5d to
8cefbaf
Compare
479f794 to
ca36986
Compare
ca36986 to
e989fc4
Compare
e989fc4 to
c417e68
Compare
c417e68 to
de32b56
Compare
|
Thanks for working on this! Apologies it took a while to review. I wonder if we should introduce 2 different implementations to handle shims ("legacy" + "sandbox"). Might add an extra burden. Bootstrap params look pretty generic and can be useful for both implementations (not just for sandboxed shims), we probably could add "features" field to bootstrap params to tell us whether shim needs to be sandboxed or not. I also not sure if we're going to deprecate "legacy" implementation any time soon. Possible we could abstract lifecycle management and have just one ShimManager instead of introducing having 3 sub managers? Some napkin notes: classDiagram
Task <|-- SandboxedShim
Task <|-- TaskedShim
ShimManager .. Task
class ShimManager {
tasks []Task
}
class Task {
Load()
Shutdown()
TaskService()
SandboxService()
}
class SandboxedShim {
}
class TaskedShim {
}
|
|
Thanks for reply @mxpv . I think when a task is SANDBOXED, containerd should no longer handle any shim lifecycle related logic for it. containerd will just get an address from the sandbox to call Task API. "SandboxedShim" is actually one kind of implementations of sandbox, and all the shim lifecycle management is moved into "shim sandbox controller", so TaskManager here can no longer handle the lifecycle of shim, TaskManager just create/start/stop/delete Tasks by calling the API through the address in the sandbox, without any knowledge of the existence of the shim. There are maybe other kind of sandbox implementations, rather than implementing the runtime sandbox API, we may just only implement the sandbox controller API. In this case there maybe no such a thing as shim at all, the Task API can be served in a VM, or in a remote machine, or in a thread inside a sandbox controller, anywhere. So I think if we split the Task into the "shimTask"(which containerd will manage the shim lifecycle for the task), and the "sandboxedTask"(which containerd just get the address from the sandbox to call Task API), we may get a cleaner codes to handle the two kinds of thing. When a task is a "shimTask" containerd will handle shim for it, when a task is a "sandboxedTask", containerd will handle sandbox for it. |
de32b56 to
357271a
Compare
there are two kinds of task, shimTask and sandboxedTask, shimTask is the legacy implementation and compatible with the podsandbox, the sandboxedTask is the task running in the sandbox created by sandbox sontroller v2 Signed-off-by: Abel Feng <fshb1988@gmail.com>
357271a to
54e8a27
Compare
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
This PR is stale because it has been open 90 days with no activity. This PR will be closed in 7 days unless new comments are made or the stale label is removed. |
|
This PR was closed because it has been stalled for 7 days with no activity. |

In this PR,The tasks is divided into shimTask and sandboxedTask, shimTask is the legacy implementation and compatible with the podsandbox controller, the sandboxedTask is the task running in the sandbox created by sandbox sontroller, which is no longer simulated by pause container.
The core commit is the latest one, and this pr has to be rebased after #9882