Am 07.03.24 um 15:12 schrieb Timo Weingärtner:
Package: systemd-resolved
Version: 252.22-1~deb12u1
Severity: important
X-Debbugs-Cc: timo.weingaert...@quantumsimulations.de

After installing systemd-resolved name resolution does not work anymore:
----8<----8<----
# apt-get --no-install-recommends install systemd-resolved
[…]
# host debian.org
Host debian.org not found: 2(SERVFAIL)
# resolvectl
Failed to get global data: Connection timed out
# systemctl restart systemd-resolved.service
# host debian.org
debian.org has address […]
[…]
----8<----8<----

The relevant error message from dbus-daemon appears before postinst creates
the user and starts the service.

Maybe creating the user in preinst already, before it is referenced in
dbus config, would be better.

This is the log, including my workaround:

The chain of events afaics is this:

1/ postinst creates systemd-resolve
2/ systemd-resolved.service is started in postinst
3/ dbus trigger is activated after postinst and the dbus config is reloaded

Because the dbus daemon reload happens after the systemd-resolved user has been created, systemd-resolved could not successfully claim the org.freedesktop.resolve1 D-Bus name.

What we would need to be able to do is to trigger a dbus daemon-reload after the system user has been created and before the service is started.

Both is autogenerated code (via dh_installsysusers and dh_installsystemd), and there is no way to inject maintscript code manually unfortunately.

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to