-
Notifications
You must be signed in to change notification settings - Fork 134
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
Register CP as a process subreaper #543
Comments
This is definitely interesting as anything we can do to enhance supervision ultimately makes ContainerPilot a more stable parent/init process. I'll have to find out what LX support there is under SmartOS as that is where most of our users are running containers. Where did this come up? Any other examples or background would be greatly appreciated. |
@cheapRoc I figured this one out myself, haven't seen it reported anywhere. What kind of background are you after? |
@cheapRoc is there anywhere I can check which linux syscalls are emulated and which are not on an LX brand zone? Is there a roadmap to track this divergence? |
@mterron I have to admit that we've turned out attention to native Linux, rather than LX, but your question would be a great one for the SmartOS mailing list. |
I'll ask over there. What does "we've turned out attention to native Linux" mean? |
Apologies for being vague. I should have said that we've turned out attention to running linux in VMs. |
Kubernetes right? That is sad, hopefully there'll be a way to use zones directly from Kubernetes and bypass the whole VM affair. Back to this Issue, do you know if there's any traction in making CP a SUBREAPER (in the context of Linux & maybe FreeBSD)? |
In systems that support it (Linux and BSD, not sure about Illumos) set Containerpilot as a subreaper. This will ensure that orphan processes get reparented to CP even if CP is not PID1.
I found this when running an interactive debugging session and finding that when sending a ^C to CP, after I got my terminal back there were still processes running that were started by processes started by CP.
On Linux the syscal to define a process as a "sub reaper" is
prctl(PR_SET_CHILD_SUBREAPER)
and was introduced with kernel 3.4.Original commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ebec18a6d3aa1e7d84aab16225e87fd25170ec2b
On FreeBSD the syscall is
procctl(PROC_REAP_ACQUIRE)
and was introduced with FreeBSD 10.2Original commit: freebsd/freebsd-src@c014fd4#diff-48eaa394a5ef45d0b55c5c98793df21e
On Illumos I'm not sure, I'll dig into the source and come back if I find something.
The text was updated successfully, but these errors were encountered: