-
Notifications
You must be signed in to change notification settings - Fork 47
IP addresses aren't removed from addnhosts when using podman-compose #86
Comments
I'm facing the same issue on Rocky Linux 8.5 with podman/podman-plugins installed via dnf and podman-compose installed via pip.
'podman network reload -a' will remove most of the stale entries but the IP address assigned to the last deceased container remains. (In my case, the IP address under /var/lib/cni/networks/tmp_default/ remains even though the container has been stopped.) Here is the compose file that I've used for reproduction.
and the log.
|
The issue is not specific to podman-compose. With podman 3.4.4 and dnsname 1.3.1 entries for detached containers don't get removed from addnhosts when the container exits.
|
After hacking the code to see the logs, I see this error
It should be The shell that runs the podman command has
And there is this dnsname/plugins/meta/dnsname/config.go Lines 61 to 67 in 664c7a6
So maybe after the This works because
|
This sounds similar to #47, but it happens with Podman 3.3.1 and a build from the master branch for me:
podman-compose up -d
podman-compose down
podman-compose up -d
podman-compose down
/run/user/0/containers/cni/dnsname/podman/addnhosts
looks like this:/var/lib/cni/networks/podman
is empty.podman run --rm -it --name test alpine
, everything works as expected.Workaround for everyone finding this issue: if I usepodman-compose -t identity up -d
instead, everything works as expected (with the container name instead of the project/pod name).It seems weird to me that this only fails without-t identity
, is that intended behaviour?(edit: seems like this either worked only once or I've been lucky)
Output from
podman network inspect podman
The text was updated successfully, but these errors were encountered: