-
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
The restored container may be killed together with the privious one #9691
Comments
I think the likely cause of this bug is that the restored container shares a cgroup with the previous container. I found that the problem does not occur when I move the processes of the restored container out of the previous cgroup. I think we should perhaps provide an option in the checkpoint and restore commands to let users decide whether CRIU should dump and restore cgroups information. I can help to submit a PR to fix this if necessary. |
hey @loheagn please assign this issue to me , i can do this !! |
@kushalShukla-web , thanks for the reply! But I don't think we have find the right way to solve the problem (if it is a bug) and to enhance the checkpoint feature. We may wait for the reply from the maintainers. |
The solution may depdend the |
sure we can wait for maintainers . :) |
Description
Let's say we have a running container whose id is
nginx-1
. We checkpoint this containernginx-1
and get a snapshot image whose name ischeckpoint-nginx-1
. Then we restore from this checkpoint and get a running container whose id isnginx-2
.Now, if we kill the
nginx-1
, the processes ofnginx-2
will also exit.Steps to reproduce the issue
ctr run -d docker.io/library/nginx:1.19 nginx-1
ctr c checkpoint --task nginx-1 checkpoint-nginx-1
ctr c restore --live nginx-2 checkpoint-nginx-1
By now, we can see that
nginx-2
is runningnginx-1
usingctr t rm -f nginx-1
, the processes ofnginx-2
will exit too.Describe the results you received and expected
I am not sure whether this is a bug or a feature as when I use
ctr t kill nginx-1
(not remove forcefully) everything works well.What version of containerd are you using?
containerd github.com/containerd/containerd v1.7.11 64b8a81
Any other relevant information
runc version:
criu version:
uname -a
Show configuration if it is related to CRI plugin.
No response
The text was updated successfully, but these errors were encountered: