podman wrongly detects systemd-resolved and fails #10733
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman fails to run within an alpine container (without systemd-resolved) that uses the host network on a host that uses systemd-resolved. This is because podman detects systemd-resolved based on the nameservers and attempts to read
/run/systemd/resolve/resolv.conf
which however doesn't exist within the container which makes podman fail.Apparently this is caused by #10598.
This came up in mgoltzsche/podman-static#10.
Steps to reproduce the issue:
Run podman within an alpine container on a host that uses systemd-resolved.
The following works fine:
$ docker run --rm --privileged -u podman:podman mgoltzsche/podman:3.2.1 podman run alpine:3.13 echo hello world ... hello world
However if I do the same using the
host
network podman fails:The
resolv.conf
within the docker container looks as follows:Describe the results you received:
podman fails because it cannot find the file
/run/systemd/resolve/resolv.conf
although in my environment it is not supposed to read the file or should ignore the error if the file doesn't exist.Describe the results you expected:
podman should not fail If
/run/systemd/resolve/resolv.conf
is not present.Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):https://github.com/mgoltzsche/podman-static
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.):
podman within alpine container created by docker on an Ubuntu 20.04 host that uses systemd-resolved.
The text was updated successfully, but these errors were encountered: