-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Properly handle operation as init process #4086
Conversation
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
fefe153
to
743f7b3
Compare
So does this supersede #3242 ? |
@iwilltry42 I believe so yes. It doesn't do everything that your PR did but it doesn't appear to be necessary to get things working? |
@brandond I'm not sure.. I think the evacuation is the most important bit and that's the same in both. |
Is there an easy way to test k3d without the entrypoint? |
Not 100% sure right now (on my phone) but using |
No, it doesn't work with K3D_FIX_CGROUPV2=0 because |
Yeah, it's hardcoded right now, but I can add an env var switch for that, if needed and drop it in the next v5 pre-release? |
This commit seems to have broken rootless mode |
I believe it's been failing since before that commit. I can still run rootless locally so I think it's something with the CI configuration. Unfortunately the cgroup v2 tests don't output any logs and I'm not sure how to execute them locally so it's been difficult to troubleshoot. |
Looking at https://github.com/k3s-io/k3s/commits/master , the CI was green ✅ for the previous commit (“ set transport to skip verify if se skip flag passed ”) |
Ah, indeed. Looks like it is legit just broken:
Do you have a suggestion as to how we could better surface errors from the rootless cgroup v2 CI? It has a history of flaking so I do not personally look too closely at the results. |
Proposed Changes
Properly handle operation as init process. This includes both vacating the root cgroup on cgroupv2 systems, and reaping child processes since containerd doesn't clean up after its own shims.
This is a Go adaptation of the behavior proposed in #3237; we rejected doing this in shell and K3d has been using a workaround ever since.
Types of Changes
bugfix
Verification
<defunct>
processes inside the Docker containerLinked Issues
User-Facing Change
Further Comments