containerd / cri

Moved to https://github.com/containerd/containerd/tree/master/pkg/cri . If you wish to submit issues/PRs, please submit to https://github.com/containerd/containerd
https://github.com/containerd/containerd/tree/master/pkg/cri
Apache License 2.0
901 stars 348 forks source link

client: add synchronize between userCloseFunc and rpc call #1644

Closed houstar closed 3 years ago

houstar commented 3 years ago

when containerd runtime plugin exites abnormally, ttrpc connection will closed and userCloseFunc will be called to handle cleanup the resources created by containerd shim. current rpc call will also return err. But these two step are asynchronous.

after rpc call return err, upper application such as k8s may restart container. but start may fail due to cleanup not finish, some resources not be released. and this leaked resources leads to failed inplace-update the pod again.

Signed-off-by: Qingyuan Hou qingyuan.hou@linux.alibaba.com

k8s-ci-robot commented 3 years ago

Hi @houstar. 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.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
AkihiroSuda commented 3 years ago

Please submit to https://github.com/containerd/ttrpc and then go mod vendor in https://github.com/containerd/containerd

houstar commented 3 years ago

@AkihiroSuda Ok, could you help to take a look at https://github.com/containerd/ttrpc/pull/87 ?