runc icon indicating copy to clipboard operation
runc copied to clipboard

runc to support setns(pid) and share(new pid) together

Open xiechao4 opened this issue 6 years ago • 1 comments

hi I want to support quick launch and sharing between processes in cloud. The case likes: All process in the cloud will load many files and do some initialization for example the JAVA class loading. So i want to setup a container named zygote container which contains the already initialization process named Zygote. When someone request a new application, a application container will be setup and request the zygote container to fork a process, this process will be forked by Zygote and moved to the application container to run the requested application. Because process can only be setns to pid namespace following parent->child->grandchild, i set up application container wtih --pid=zygote container. It makes that application container share same pid namespace with zygote container. This will make application container not be private, for example not correct init process in application container. i want to make zygote container pid namespace to be parent of application container pid namespace as below application 1 container ^ | | child
| zygote container | | child | v application 2 container

Current runc implementation support container to enter someone's namespace, but do not support new pid namespace by share after enter someone's pid namespace. How can i do that or there are something i misunderstand.

Thanks

xiechao4 avatar Oct 15 '20 00:10 xiechao4

runc does not support creating a new PID namespace nested in an existing one (a namespace can either be created, or joined by path), and there are no plans to implement this. Closing.

kolyshkin avatar Oct 09 '26 02:10 kolyshkin