-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
kata cleanup is not completed when --rm is used #6222
Comments
I was able to fix it with something like that: Although I'm not sure it's a proper fix as i found out that the issue is derived by the order of the cleanup, qemu is not terminated whenever runtime continer cleanup (delete(ctx)) is done after tearing down the storage (Is it a valid order of operations?) Any guidance will be appreciated :) |
I believe we are calling kata-runtime-stop and kata-runtime-kill when stopping and removing the container, then we remove the storage. kata-runtime should be stopping the qemu process. Podman does not know anything special about kata versus crun, versus runc. @mheon WDYT |
The suggested patch is completely unworkable; we cannot allow cleanup on running containers, it would allow containers that are running to be unmounted. It sounds like Kata really disagrees with us unmounting the storage first, then removing the container from the runtime. That seems like a reasonable ask from an OCI runtime, so I've added a patch (#6229) to do this. If that's not enough to resolve things, this is definitely a Kata bug. |
Does Removing state means container might still be running? (in this patch i changed it so be set to Removing only if it's not Running) #6229 won't help as cleanupRuntime checks if it's Stopped or Created state on the beginning, hence it immediately returns since the state is Removing. The problem seems to be with teardownStorage not cleanupStorage, what is actually the difference? |
Removing means the container is in the process of being deleted. I'm really confused as to how we're getting into Removing while cleanup hasn't been completed, though, Removing should guarantee cleanup already ran... |
Nevermind, think I know what's going on here. If |
Pushed one more commit that might resolve this |
fixed by #6229 |
/kind bug
Description
When running kata-containers with --rm qemu is not terminated after container
running is completed.
Steps to reproduce the issue:
Install kata
sudo podman --runtime=/usr/bin/kata-runtime run --security-opt label=disable -it --rm fedora:latest sleep 1
ps aux | grep qemu
Describe the results you received:
qemu process is still running
Describe the results you expected:
qemu should have been terminated
Additional information you deem important (e.g. issue happens only occasionally):
This is happening since ContainerStateRemoving state was added
(25cc43c)
Output of
podman version
:Output of
podman info --debug
:The text was updated successfully, but these errors were encountered: