-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
cri support restart exited containers #10213
base: main
Are you sure you want to change the base?
Conversation
Hi @soulfy. 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. 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. |
f8c74b1
to
398605c
Compare
In production environment, users may want to restart containers, those in the Exited state, instead of creating new containers. Docker can do it. Signed-off-by: soulfy <[email protected]>
398605c
to
6be69d6
Compare
Signed-off-by: soulfy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, it's not accepted to support restart. Docker API is total different with CRI.
Kubernetes doesn't support to restart exited container. If you want to support it, please file KEP to kubernetes first. Thanks. Closing
REF: #6763
Why not consider starting with runtime support first, and then pushing the upper-level callers in the reverse direction. |
It's related to life-cycle change. I don't think we should support this case which is conflicted with kubelet behavior. Please see the following comment. If you're going to extend API with annotation or enhance with runtime-level concepts, like image snapshot which is not available to kubelet, it sounds good. But for this, I will vote -1.
If you're using kubernetes, kubelet won't call Start after exited. Kubelet will delete that container. It looks conflict to me. So, it seems that you are using CRI in non-kubernetes scenario. Why use CRI to support non-kubernetes case? You can use containerd to build your own plugin. It's already supported.
For me, -1 to support restart case. You can reopen this and ping other maintainers comment. Wei |
thanks for your response. we are in a custom kubernetes scenario. for this, we did some modification in kubelet. |
I see. Guess that it's stateful application. Reopen this and wait for other maintainers' comment. |
thanks. expecting happy ending 😁 |
I generally agree with what @fuweid said. CRI is for Kubernetes and I don't want to make that more complex for supporting what Kubernetes wouldn't do.
Why do you (or your applications) want to restart a container instead of making a new one? |
Some applications migrated from VM have not yet fully adapted to containerization, so we provide such a transition method |
I'm not really in favor of modifying containerd in order to support custom forks of Kubernetes. If Kubernetes adds support for container restarts (as opposed to delete/recreate) then that would be a good reason to support it in containerd. |
Signed-off-by: soulfy <[email protected]>
some users cp a new jar to the container,and restart it to perform a quick verification. Instead of make a new image(it will waste more time). I want to find some method to solve this problem. |
i think pause/resume action is different from restarting a exited container. |
In production environment, users may want to restart containers, those in the Exited state, instead of creating new containers. Docker can do it.