cri: do not set sandbox id when using podsandbox type#11735
cri: do not set sandbox id when using podsandbox type#11735mxpv merged 1 commit intocontainerd:mainfrom
Conversation
|
Hi @yylt. 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-sigs/prow repository. |
|
/ok-to-test Would you mind rebasing on the tip of |
|
This appears to fix #11708 for me.
The protocol is described here and here. In particular:
I'm not wild about special-casing the "podsandbox" sandboxer here; it should really be that containerd is reading and respecting the value returned by the shim. However, I'm going to approve this anyway because I'd like to get this fixed for 2.0 (and we can clean it up afterward). It looks like I have write permission on the branch, so I'll do the rebase onto |
Signed-off-by: yang yang <[email protected]>
|
For more context on why this change works: prior to the change, containers using podsandbox sandboxer and a third-party shim that did not group would not receive a |
|
/cherry-pick release/2.0 |
|
@mxpv: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
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-sigs/prow repository. |
|
Yup, just noticed it. I guess there is no way to cancel the request, so I'll close the PR once its opened. |
|
@mxpv: #11735 failed to apply on top of branch "release/2.0": DetailsIn response to this:
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-sigs/prow repository. |
|
Thanks, but when containerd invokes the shim for start new I believe I must have missed some information. Could you please clarify this? Thank you very much |
|
I'm having trouble understanding your question. When containerd starts a new container, it execs a new shim process (for example,
The mechanism used by the shim to do this is deciding what address to return. In case (1) above, every container gets a unique address (and there is typically a unique process that listens on the socket). In case (2) above, each group of containers gets a unique address, and the shim logic gets to decide what constitutes a group (the |
|
Thank you for your patience, @samuelkarp finally, see https://github.com/containerd/containerd/blob/fb4c30d4ede3531652d86197bf3fc9515e5276d9/cmd/containerd-shim-runc-v2/manager/manager_linux.go#L198-L203C3, where use sandbox id replace container id |
|
I think we should use containerd/1.7 server to create pod with shim-runc-v1. And then we upgrade it into v2.x and do test. I would like to see there is e2e test case before release. |
mean #11535? |
|
@yylt For the runc-v1 binary, it doesn't support grouping containers in one shim. I think it's good chance for us to verify your change without introducing gVisor depedency. Based on this issue - #9727 (comment), we should check state dir after deleting one container. It should not have any leaky resource. |
Yes, we should check the status directory after remove container At the same time, there is a problem, when upgrad from 1. x to 2.0, create and start new container based on sandbox which the old shim-v2 prepared, it is should also be expected to be successful. The above modifications are on new pr. Could you take a look and provide suggestions |
Fix #11708
The exit of the
work containerwill callshutdownat 1.7, but only callshutdownwhen the sandbox exits at 2.0.Based on the above code, it seems to be an issue with gvisor, and the shim connection (write close at shim side) should be closed when call
deleterpc.Above, could solve problem #11708, but not sure it's worth.
If there were clearer documentation about the shim API, I think it would be more helpful for this issue
cc @mxpv