Skip to content

Conversation

@abel-von
Copy link
Contributor

@abel-von abel-von commented Feb 27, 2024

We can not handle the task in the pod sandbox as a sandboxed Task because podsandbox controller rely on task plugin to create pause container, If the task handle rely on podsandbox controller, it will make a cyclic dependency of plugins.

So In this PR, We add a new PodSandboxPlugin type for the podsandbox controller, Shim sandbox controller and other user defined sandbox controllers will be kind of SandboxControllerPlugin. and the subsequent PR of sandboxed Task will rely on this PR to handle sandboxed Task in sandbox of SandboxControllerPlugin.

@k8s-ci-robot
Copy link

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@mxpv
Copy link
Member

mxpv commented Feb 27, 2024

There is no legacy podsandbox controller. Sandbox api was introduced in 1.7 as experimental API with no backward compatibility guaranties until its stable. It's perfectly legal to break things until 2.0 release.

@abel-von
Copy link
Contributor Author

abel-von commented Mar 1, 2024

It is just the podsandbox controller is a little bit special because it manage sandbox by Task plugin. and in #9884 the sandboxed Task may have dependency on the sandbox controller to update the sandbox before/after task manangement, this makes a cyclic dependency.

We add a v2 sandbox controller to distinguish it with the podsandbox controller, so we can exclude it from the sandboxed Task dependency.

In the last community meeting I proposed another solution, we can add a ReqiureExcludes in the plugin definition to exclude the podsandbox controller from the Requires
image

I am not sure which is a better solution, may you have a better suggestion, please? @mxpv

@abel-von abel-von mentioned this pull request Mar 1, 2024
19 tasks
@abel-von abel-von force-pushed the sandbox-controller-v2 branch 2 times, most recently from 30c5593 to 000a367 Compare March 13, 2024 07:50
@Burning1020
Copy link
Member

/ok-to-test

@Burning1020
Copy link
Member

Shell we add this in 2.0 milestone list? @mxpv @fuweid

@abel-von
Copy link
Contributor Author

abel-von commented May 6, 2024

/retest

@abel-von abel-von force-pushed the sandbox-controller-v2 branch from 000a367 to b2bfed6 Compare May 11, 2024 02:47
@abel-von abel-von changed the title sandbox: add plugin type of SandboxControllerPluginV2 sandbox: make podsandbox controller plugin type of PodSandboxPlugin May 11, 2024
@abel-von
Copy link
Contributor Author

/retest

@abel-von
Copy link
Contributor Author

@mxpv could you please take a look?

@abel-von
Copy link
Contributor Author

Please take a look at this PR while you have time. @mxpv @dmcgowan @fuweid

@abel-von
Copy link
Contributor Author

/cc @mxpv @dmcgowan @fuweid

@k8s-ci-robot k8s-ci-robot requested review from dmcgowan, fuweid and mxpv July 15, 2024 08:09
@abel-von
Copy link
Contributor Author

@mxpv Could you please take a look at this PR again? I realized that the change of plugin name may related to the change of config and config migration. Maybe we don't have to consider the compatibility issue, if we can merge it before 2.0.

Copy link
Member

@mxpv mxpv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but needs rebase.

@fuweid
Copy link
Member

fuweid commented Oct 15, 2024

ping @abel-von @Burning1020

Signed-off-by: Abel Feng <fshb1988@gmail.com>
cri will call sandbox controller from the sandboxService, remove the
dependency of client.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
@abel-von
Copy link
Contributor Author

Done resoved the confliction, but the some of the ci tests failed which seems not related to the current PR. @fuweid

@AkihiroSuda AkihiroSuda added this pull request to the merge queue Oct 17, 2024
Merged via the queue into containerd:main with commit 72e4db7 Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants