Skip to content

systemd unit needs Wants and Before #14059

@lingfish

Description

@lingfish
  • Program: Recursor
  • Issue type: Bug report

Short description

Due to #13210, recursor starts after the nss-lookup.target, and this then breaks other things like ntpd and Wireguard, as is shown here:

Apr 11 12:23:58 hostname systemd[1]: Reached target nss-lookup.target - Host and Network Name Lookups.
Apr 11 12:24:14 hostname ntpd[989]: DNS: dns_check: DNS error: -2, Name or service not known
Apr 11 12:24:21 hostname systemd[1]: Reached target network-online.target - Network is Online.
Apr 11 12:24:21 hostname systemd[1]: Starting pdns-recursor.service - PowerDNS Recursor...
Apr 11 12:24:21 hostname wg-quick[1109]: Name or service not known: `hidden.host.name:999999'
Apr 11 12:24:21 hostname pdns-recursor[1039]: Apr 11 12:24:21 PowerDNS Recursor 5.1.0-alpha0.1346.master.g617d2f04d (C) PowerDNS.COM BV

Environment

  • Operating system: Debian
  • Software version: 5.1.0-alpha0.1346.master.g617d2f04d
  • Software source: PowerDNS repository

Steps to reproduce

Reproducible by having the above version installed.

Expected behaviour

Recursor should be Before nss-lookup.target so that other units waiting on that target work.

Actual behaviour

See above.

Other information

I believe the unit needs After, Wants, and Before, as per Debian's unit file for ISC bind.

I'm no expert on systemd unit dependency stuff, but I'm inclined to trust them.

See also this discussion that makes things clearer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions