-
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 left semi-alive after removal failed with error unmounting container: layer is not mounted #4033
Comments
there is an open PR to take care of such issue: #3549 |
This doesn't need evict - Podman rm --storage should take care of it
…On Mon, Sep 16, 2019, 08:39 Giuseppe Scrivano ***@***.***> wrote:
there is an open PR to take care of such issue: #3549
<#3549>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4033>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB3AOCFPUAWWDBINWEFBL6LQJ5473ANCNFSM4IW7JIJA>
.
|
The error here is properly strange, though - we should be ignoring that already during removal. |
We should not be throwing errors because the operation we wanted to perform is already done. Now, it is definitely strange that a container is actually unmounted, but shows as mounted in the DB - if this reoccurs in a way where we can investigate, it's worth tearing into. Fixes containers#4033 Signed-off-by: Matthew Heon <[email protected]>
Ah, nevermind - we handle no-such-container errors, but not not-mounted errors. Very strange that the container unmounted and the DB still showed it as mounted, still. That could have led to very strange undefined results if you tried to restart the container. Fix for the condition that caused this is in #4035 but it's mainly just treating the symptoms. If we can get a reproducer for whatever allowed the container to unmount while the DB said it was mounted, that needs to be fixed. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Container destruction (
podman rm
) failed, and since then the container name is blocked (cannot create a new container with the same name) but the old container does not show, and cannot be removed.Steps to reproduce the issue:
Seems like an odd error, difficult to reproduce.
Container was deleted with
podman rm project_cable_1
and the following error happened:ERRO[0003] cleanup storage: failed to cleanup container 20956322f967c942eade94cb45f63b419c2871fafcc8c78fdb78bfe87fefe936 storage: error unmounting container 20956322f967c942eade94cb45f63b419c2871fafcc8c78fdb78bfe87fefe936 root filesystem: layer is not mounted Error: error cleaning up container 20956322f967c942eade94cb45f63b419c2871fafcc8c78fdb78bfe87fefe936: error unmounting container 20956322f967c942eade94cb45f63b419c2871fafcc8c78fdb78bfe87fefe936 storage: error unmounting container 20956322f967c942eade94cb45f63b419c2871fafcc8c78fdb78bfe87fefe936 root filesystem: layer is not mounted
Container is not showing up in
podman ps
Creating a new container with the same name fails with:
Error: error creating container storage: the container name "project_cable_1" is already in use by "20956322f967c942eade94cb45f63b419c2871fafcc8c78fdb78bfe87fefe936". You have to remove that container to be able to reuse that name.: that name is already in use
Deleting the container by name fails with:
Error: no container with name or ID project_cable_1 found: no such container
Deleting container by ID fails with:
Error: no container with name or ID 20956322f967c942eade94cb45f63b419c2871fafcc8c78fdb78bfe87fefe936 found: no such container
Describe the results you received:
Cannot delete container, cannot recreate a container with the same name
Describe the results you expected:
Either deletion works or recreation works...
Initial container removal should have worked. When trying to umount a layer, the fact that it was not mounted should not have been fatal to container removal. In both cases, the layer ends up unmounted.
If the removal does not work, something should be left over to allow manual suppression afterwards.
Additional information you deem important (e.g. issue happens only occasionally):
Seems an off error that happened while using podman-compose which is issuing many podman commands quickly one after another.
The following sequence of commands were issues for that container:
podman create --name=project_cable_1 --pod=project
which succeededpodman start -a project_cable_1
which might have been interrupted and exited with status -2 (podman-compose was stopped at that moment)podman stop -t=1 project_cable_1
failed withError: can only stop created, running, or stopped containers. 20956322f967c942eade94cb45f63b419c2871fafcc8c78fdb78bfe87fefe936 is in state configured: container state improper
podman rm
failed as described aboveOutput of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):
Laptop running Fedora Silverblue
The text was updated successfully, but these errors were encountered: