-
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
oci: terminate all container processes on cleanup #17025
oci: terminate all container processes on cleanup #17025
Conversation
if the container has no pid namespace, they are not killed when the container process ends. In this case, attempt to kill them in the same way. The problem was noticed with toolbox where the exec'ed sessions are not terminated when the container is stopped, blocking the system shutdown. [NO NEW TESTS NEEDED] Signed-off-by: Giuseppe Scrivano <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@mheon PTAL |
LGTM |
This will clean --pid=host iff Podman is still running, I guess podman cleanup will also clean them up when conmon exits, |
this is used with "podman container cleanup" |
Why make this party of cleanup? I would’ve hooked it into the stop() logic
so we always clean exec sessions to avoid leaks.
Otherwise LGTM
…On Sat, Jan 7, 2023 at 09:47 Giuseppe Scrivano ***@***.***> wrote:
This will clean --pid=host iff Podman is still running, I guess podman
cleanup will also clean them up when conmon exits,
this is used with "podman container cleanup"
—
Reply to this email directly, view it on GitHub
<#17025 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCA6XZD2MO4JWMA4BJLWRF6YLANCNFSM6AAAAAATT7AN7E>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It would also need to be in podman kill and if a random process on the system like systemd comes in and kills conmon. |
Thanks for the fix, @giuseppe ! |
this is included in the v4.4 branch so will land in v4.4.0 on fedora once released. |
if the container has no pid namespace, they are not killed when the container process ends. In this case, attempt to kill them in the same way.
The problem was noticed with toolbox where the exec'ed sessions are not terminated when the container is stopped, blocking the system shutdown.
[NO NEW TESTS NEEDED]
Signed-off-by: Giuseppe Scrivano [email protected]
Does this PR introduce a user-facing change?