#1107134 podman: DNS resolution fails during startup

Package:
podman
Source:
podman
Description:
tool to manage containers and pods
Submitter:
Jan-Nick Kemming
Date:
2025-06-10 19:23:01 UTC
Severity:
normal
#1107134#5
Date:
2025-06-01 21:52:15 UTC
From:
To:
Dear Maintainer,

I'm trying out Podman Quadlets on trixie and ran into an issue. I've reproduced a minimal setup using a clean install inside a VM:

* Installed Debian trixie without a Desktop environment
* Installed Podman
* Switched to root and created two files (see content below):
   * `/etc/containers/systemd/nginx.container`
   * `/etc/containers/systemd/nginx.image`
* Rebooted
* Problem: The generated `nginx-image` service fails to start, apparently because the DNS server refused connection (see error message below)

Some notable observations:

* The same thing happens every time the machine boots.
* I couldn't reproduce the problem when I installed the Gnome desktop environment
* If I manually start the service after booting, it works.
* Adding a slight delay via `ExecStartPre=/bin/sleep 3` fixes the problem as well.
* The same thing happens for `.build` Quadlets.

While the sleep fix works fine for the moment, it'd be very nice to have a proper fix for this. Please let me know if I can assist further, I'd be glad to debug some more if that helps.

Kind regards
Jan-Nick Kemming


Error message during boot:
```
nginx-image[669]: Error: initializing sourcedocker://nginx:1-alpine: pinging container registry registry-1.docker.io: Get"https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:60599->[::1]:53: read: connection refused
podman[669]: 2025-06-01 23:17:36.884885462 +0200 CEST m=+0.242767005 image pull-error  docker.io/library/nginx:1-alpine initializing sourcedocker://nginx:1-alpine: pinging container registry registry-1.docker.io: Get"https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:60599->[::1]:53: read: connection refused
```

Content of `/etc/containers/systemd/nginx.container`:
```
[Install]
WantedBy=default.target

[Container]
Image=nginx.image
```

Content of `/etc/containers/systemd/nginx.image`:
```
[Image]
Image=docker.io/library/nginx:1-alpine
```

#1107134#10
Date:
2025-06-10 19:11:27 UTC
From:
To:
After some further testing, this issue seems to affect all Quadlets -
even `.container`s. Also, the startup delay fix has suddenly stopped
working for my `.build` Quadlet. All other Quadlets are fine, just that
one now consistently fails.