Description of problem: With recent podman update to podman-3:3.2.0-5.fc34.x86_64 I've noticed broken networking in the container in form of /etc/hosts containing IP address that's not reachable by the container itself but it's associated to the hostname of the container. Version-Release number of selected component (if applicable): podman-3:3.2.0-5.fc34.x86_64 How reproducible: always Steps to Reproduce: 1. podman run --rm -it registry.fedoraproject.org/fedora:34 cat /etc/hosts Actual results: $ podman run --rm -it registry.fedoraproject.org/fedora:34 cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 # used by slirp4netns 10.0.2.2 9157f08f6462 hardcore_yalow 10.0.2.2 host.containers.internal Expected results: $ podman run --rm -it registry.fedoraproject.org/fedora:34 cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 # used by slirp4netns 10.0.2.100 9157f08f6462 hardcore_yalow Additional info: When checking the ip address of the container, it's 10.0.2.100 so this is the value that should be in /etc/hosts. This breaks so many things like python detection of the IP address: socket.gethostbyname(socket.gethostname())
After downgrading to older podman (podman-3.1.0-1.fc34.x86_64), everything works as expected.
Note that podman in updates-testing podman-3:3.2.1-1.fc34.x86_64 has the issue as well.
Upstream fix: https://github.com/containers/podman/pull/10684
Wow, that was quick. Thanks for the fix :)
*** Bug 1971677 has been marked as a duplicate of this bug. ***