-
Notifications
You must be signed in to change notification settings - Fork 2.6k
static ip address is already allocated, but that container is already deleted #25422
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
Comments
First tried it with podman version 5.3.2 but have the same issue with 5.4.0. Adapted the first post with the new data for 5.4.0. |
Do you know who the |
Dont know what you mean with that. I cant find that one in the logs 🤔
Yes, I reboot the machine. Once I login I can already see that the status of the pod is failed and in the logs I can see from the timestamp that the pod failed to start before I've logged in.
Yes during the tests this was the only pod in that network. I have only used the quadlets attached above. I also thought some other container got the IP instead of this one, thats why I tested it only with one container at all. Also it looks like if I enable linger first and then install podman there is no problem. At least it is running for a few hours and restarts without a problem. |
Yeah just checking the full journal, podman should log all events to the journal so the ID from the error that is already assigned must exist (or exited at some prior) point, it would be good to know what kind of container this was to rule out that there is another container requesting it. You can also read the evens with |
Ahh now I've got it.
Now I also see the root cause for the failing start With this info now I will try the workaround mentioned in this issue #22197. Thank you for your very fast reply and assistance to help me find the root cause 🌝 |
The other issue is closed and it only describes the symptom of why an early start of the unit fails. Here the seems to be clearly an issue with allocating an ip address but never freeing it on the error path again. Which means the allocation got leaked forever which is a real bug, the nest restart should not fail because of this. |
Thank you for fixing it that fast @Luap99! Beside of that reassigning of the ip problem there seems to be another problem on my machine because it is calling pasta with a wrong paramter. Most likely this isnt a bug but I dont know what it is. |
Unfortunately the work arounds are all horrible. Even that podman work around is far from perfect, #24796. Most likely in your case it means that the network-online.target is ready for even before your actual network is fully online then. |
Uh oh!
There was an error while loading. Please reload this page.
Issue Description
After rebooting a server a rootless container is spawned by systemd service and failed with information: IP address is already allocated.
This was already reported in #24915 and #15708 but it is now happening for me only if lingering is enabled for the rootless user.
If I disable lingering and restart the pc, the container will start again without this error and the static IP address assigned.
Attached you can find two logs. One with enabled linger (container startup is failing) and one with linger disabled (container starts successfully once user is logging in via ssh).
boot-linger-disabled.log
boot-linger-enabled.log
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
The container fails to start while starting the container after reboot with the following error:
Error: starting container e1231c28dcddb6f10e4fde3e080ecc2e6db8bc0f89f293179354caef859bd58c: IPAM error: requested ip address 172.21.0.2 is already allocated to container ID 3c9
Describe the results you expected
I would expect the container to start after boot with the predefined static ip because it is not assigned to another container.
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
I have installed Debian 12.9 with unstable repo enabled but Pin-Priority set to 100 so I can install only podman from the unstable repo. Becuase current podman version in the debian stable version does not support quadlets.
Additional information
Happens only when lingering is enabled
Quadlet files to preproduce:
traefik.network
[Network]
Driver=bridge
IPv6=true
Subnet=172.21.0.0/16
Subnet=fd00:dead:beef::/48
traefik.container
[Container]
Image=docker.io/traefik:latest
Pod=traefik.pod
traefik.pod
[Pod]
PublishPort=1050:80
Network=traefik.network:ip=172.21.0.2
PodmanArgs=--log-level debug
[Install]
WantedBy=multi-user.target default.target
The text was updated successfully, but these errors were encountered: