-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Can processes be 'detached' from the runtime? #1507
Comments
I'm not sure what you mean.
Does that answer your question? If you're asking about killing |
Thanks for the quick reply. I actually saw I think we can close this issue, one last thing I'd like to understand is if - in the detached case - the 'container' is now solely kernel-space objects, i.e. just processes with namespaces and cgroups? or if there is still a user-space process which is supervising the container. |
Unfortunately the on-boarding for this is much harder than necessary. If you want to have a new pty created for your container ( However, if you just want to pass it the file descriptors it should use for
You can create some I am very sad that this is not documented
That is correct. When I said "where the runc process will not exist after the container has started" I meant it. We only spawn processes necessary to set up the container, and after the init process for the container has started none of our code is running anymore. When managing containers we do everything using |
Yes, I saw hat runtime informations are kep in some run dir. I like this, just my 2ct on that :) So - It seems that we need to keep open the fds. And it actually sounds as if we do need a user-space component for this. But IIUCI then, if this user-space component holding the fds dies, the container will die as well. Which brings me back to say that we do need to keep some fd open somewhere in user-space (fifo, pipe, process) to allow the processes to run. Correct? I wonder, how is it done by ocid - does ocid provide the fds used by runc? |
Only if you want to have
[Note: fifos and pipes aren't in userspace] It is correct that if you want to have I have some ideas about how you might be able to fix this issue in the future (it requires some not-very nice hacks and kernel patches) but at the moment it's not possible. There are two main things it boils down to:
I'm working on solving both of these problems in the kernel.
crio has a manager for each container called |
Yes, you are obviously right that fifos and pipes are not in user-space. So, in crio - it's still the case that if the crio crashes, that the processes/containers will die, because the fd got closed? And feel free to close this issue. |
In Closing. Feel free to ask in the |
We have a use case - libvirt in a container - where we would like to keep the processes (qemu, the VMs) running if the container goes down.
The whole point of containers is to contain processes, I'd still like to understand if it would be possible that processes (not pid1 in the container) could be kept running, even if the container runtime goes away.
I'm explicitly saying container runtime here, because I could imagine that the "container" might be able to outlive it's runtime, because it's based on kernel objects (namespaces, cgroups).
But I'm likely wrong, and thus would like to clarify if something like this would be possible?
The text was updated successfully, but these errors were encountered: