-
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
container/pod refuse to be removed cause defunct exec session process #14252
Comments
Thanks for reaching out, @dispensable. The request makes sense to me, especially with |
@mheon Would this be enough
|
That won't help, we already short-circuit checkReadyForRemoval() in the force case, and I don't want to remove a container with active exec sessions without force. |
Huh? This is only removing ExecSessions with Force. |
Which happens later in removeContainer |
I think we are failing before we get there. which is what the user is complaining about. Perhaps this was fixed, and my patch is not necessary. |
The way I read the code, this works already, though you need to remove the container twice? |
@rhatdan No, that code is never running for |
I think the real fix is probably to continue, not hard-error, if removing exec sessions failed. |
SGTM, could you open a PR. Googling for a zombie, finds.
|
Removing exec sessions is guaranteed to evict them from the DB, but in the case of a zombie process (or similar) it may error and block removal of the container. A subsequent run of `podman rm` would succeed (because the exec sessions have been purged from the DB), which is potentially confusing to users. So let's just continue, instead of erroring out, if removing exec sessions fails. [NO NEW TESTS NEEDED] I wouldn't want to spawn a zombie in our test VMs even if I could. Fixes containers#14252 Signed-off-by: Matthew Heon <[email protected]>
Removing exec sessions is guaranteed to evict them from the DB, but in the case of a zombie process (or similar) it may error and block removal of the container. A subsequent run of `podman rm` would succeed (because the exec sessions have been purged from the DB), which is potentially confusing to users. So let's just continue, instead of erroring out, if removing exec sessions fails. [NO NEW TESTS NEEDED] I wouldn't want to spawn a zombie in our test VMs even if I could. Fixes containers#14252 Signed-off-by: Matthew Heon <[email protected]>
Removing exec sessions is guaranteed to evict them from the DB, but in the case of a zombie process (or similar) it may error and block removal of the container. A subsequent run of `podman rm` would succeed (because the exec sessions have been purged from the DB), which is potentially confusing to users. So let's just continue, instead of erroring out, if removing exec sessions fails. [NO NEW TESTS NEEDED] I wouldn't want to spawn a zombie in our test VMs even if I could. Fixes containers#14252 Signed-off-by: Matthew Heon <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Podman container/pod refuse to be removed cause active exec session. But the exec session is just a defunc zombie process and will never been kill or cleanup. We can only reboot the system to clean zombie process and pod/container.
Steps to reproduce the issue:
Sorry, but I don't know how to create a zombie exec session (it just happened).
Describe the results you received:
b094f727f1dd4dc06f7743a061b2d2ece691eb59adfc3c4e4791d0b2ae16ac62 has containers that are not ready to be removed: cannot remove container 585ec09d8b1ec7c5ff2791261e30829dc117c838f0e9d925eb25263a8182ec37 as it has active exec sessions: container state improper
Describe the results you expected:
container/pod removed successfully.
podman pod rm -f
should ignore defunct zombie exec session cause they will never be killed during system up also unnecessary.Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
It's hard to create a zombie exec session, so I haven't test on latest podman
Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: