Package: resolvconf
Version: 1.87
Severity: important

Dear Maintainer,

on every boot:
- /usr/lib/tmpfiles.d/resolvconf.conf via systemd-tmpfiles-setup.service
  creates /run/resolvconf/postponed-update
- /lib/systemd/system/resolvconf.service runs `$ resolvconf
  --enable-updates`.

If these two events would happen in this order, `$ resolvconf
--enable-updates` would remove the `postponed-update` file and update
`/run/resolvconf/resolv.conf`.

But at least on my system `resolvconf.service` runs before
`systemd-tmpfiles-setup.service`. Just creating the `postponed-update`
file while updates are enabled does not trigger an update. Thus the
empty /run/resolvconf/resolv.conf (also written through
systemd-tmpfiles) is never overwritten, leaving the system without the
ability to resolve DNS names, until `$ resolvconf -u` is run.

This can probably be fixed by adding the following line to the
Unit-Section of resolvconf.service:

    After=systemd-tmpfiles-setup.service

I do not believe that will introduce any cycles, but I've also not
looked into that.


Some more information:

This is on a VPS upgraded from buster to bullseye (but still running the
buster kernel)

On my system I have resolved this issue using this Service, creating the
`postponed-update`-file before starting resolvconf.service:

    # SPDX-FileCopyrightText: 2021 Timon Reinold <ti...@agon.one>
    # SPDX-License-Identifier: GPL-3.0-or-later
    [Unit]
    Description=Shedule resolvconf update
    DefaultDependencies=no
    Before=resolvconf.service
    
    [Service]
    ExecStart=/sbin/resolvconf -u
    
    [Install]
    WantedBy=sysinit.target

but I fear that might exhibit the same SE-Linux issue the commit
159e3214 introducing this issue fixed. The `After=`-Line mentioned above
should be preferred.

-- System Information:
Debian Release: 11.0
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'master'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages resolvconf depends on:
ii  debconf [debconf-2.0]  1.5.77
ii  lsb-base               11.1.0

resolvconf recommends no packages.

resolvconf suggests no packages.

-- Configuration Files:
/etc/resolvconf/resolv.conf.d/base changed [not included]

-- debconf information:
  resolvconf/reboot-recommended-after-removal:
* resolvconf/downup-interfaces:
  resolvconf/link-tail-to-original: false
* resolvconf/linkify-resolvconf: true

Reply via email to