-
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
Unexpected error "Cleanup volume: volume is being used by the following container" #12808
Comments
I think this is expected; the second container wants to remove any anonymous volumes (the volume mounted in from the first container, in this example), but it can't because the other container is still active. @rhatdan What do you think? |
As a user, when I use "--rm" I intent to remove the second container, not really the volume. I indeed created the volume as an anonymous one on purpose, because I indeed really wanted to make this volume disappear automatically when all containers using it disappears. However when only one of them disappears, I don't expect podman to write down an error like this. I see this anonymous volume like a std::shared_ptr in C++: it's an annonymous ref-counted resources that disappears when no else references it. Actually some of my users are now reaching out to me that they have errors being logged on sceen, and I have to tell them that these are expected errors, they can ignore them. It feels a bit confusing IMO. |
In other words, I would find this error expected on a command like "podman volume rm" where the intent is really to remove volumes, but not when removing a container (which happens to use shared volumes). |
I agree this looks like a bug to me. I would not expect a container that uses --volumes-from to attempt to remove the volume. |
A friendly reminder that this issue had no activity for 30 days. |
When removing a container created with a --volumes-from a container created with a built in volume, we complain if the original container still exists. Since this is an expected state, we should not complain about it. Fixes: containers#12808 Signed-off-by: Daniel J Walsh <[email protected]>
When removing a container created with a --volumes-from a container created with a built in volume, we complain if the original container still exists. Since this is an expected state, we should not complain about it. Fixes: containers#12808 Signed-off-by: Daniel J Walsh <[email protected]>
/kind bug
Description
It seems that the removal of one container which actually uses the volume of another one leads to unexpected "Cleanup volume: volume is being used by the following container" errors.
Steps to reproduce the issue:
Describe the results you received:
In step 4, we see an unexpected error "Cleanup volume: volume is being used by the following container".
Describe the results you expected:
In step 4, I would expect that no error is logged.
Additional information you deem important (e.g. issue happens only occasionally):
All this was tested on a x86-64 RHEL 8, using the podman image quay.io/podman/upstream started with --privileged mode.
Output of
podman version
:The text was updated successfully, but these errors were encountered: