-
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 name permanently in use after infra container renamed then pod removed #11750
Comments
@mheon PTAL |
As we were not updating the pod ID bucket, removing a pod with containers still in it (including the infra container, which will always suffer from this) will not properly update the name registry to remove the name of any renamed containers. This patch ensures that does not happen - all containers will be fully removed, even if renamed. Fixes containers#11750 Signed-off-by: Matthew Heon <[email protected]>
#11774 to fix |
As we were not updating the pod ID bucket, removing a pod with containers still in it (including the infra container, which will always suffer from this) will not properly update the name registry to remove the name of any renamed containers. This patch ensures that does not happen - all containers will be fully removed, even if renamed. Fixes containers#11750 Signed-off-by: Matthew Heon <[email protected]>
How do I go about removing such a container now that it happened? EDIT: Also I am on AlmaLinux, so I am not sure how to make use of the latest podman versions which have this fix, going forward? I have a setup were I am exposed to this issue. UPDATE: Got it all figued out! |
podman system reset, which will bring you back to init state, remove all containers and images. |
Sure, thank you. But that is not variable when one is actively using many containers in production already, is it? |
I'll take a look when I have time (maybe tomorrow?) to see if there's a way to remove names that experienced this. However, barring manual database editing with a hex editor (which we strongly do not recommend), I don't see an easy path forward aside from removing the database (and thus all records of existing containers). |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
If you rename the infrastructure container within a pod, then remove the pod using
podman pod rm <pod>
the name of the infrastructure container is permanently unavailable for use. Inspectingbolt_state.db
shows that a dangling entry exists inname-registry
.Steps to reproduce the issue:
podman pod create --name test_pod
podman rename $(podman container ls -aq --filter pod=test_pod) test_pod-infra
podman pod rm test_pod
podman run -d --name test_pod-infra pause
Describe the results you received:
Describe the results you expected:
A container or pod with the name
test_pod-infra
is created.Additional information you deem important (e.g. issue happens only occasionally):
Seems to be reproducible with the steps above
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/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
VMware Workstation - Ubuntu 21.04 - Kubic packages - rootless
The text was updated successfully, but these errors were encountered: