Netplan is updating /run/systemd/resolve/resolv.conf
nucc1@sol:/etc/systemd$ cat /run/systemd/resolve/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
I'm using ubuntu 18.04, I have removed cloud-init, but i'm using netplan and systemd-networkd as usual.
I've also disabled the stub dns server (plan is to deploy dnsmasq).
Netplan config is as follows (for test, enp3s0 is unplugged).
network:
ethernets:
enp3s0:
dhcp4: true
enp4s0:
addresses: [192.168.1.254/24]
gateway4: 192.168.1.1
nameserver s:
addresses: [1.1.1. 1,8.8.8. 8,8.8.4. 4]
dhcp4: false
version: 2
renderer: networkd
I expected that the settings I specified in netplan config would find their way into /etc/resolv.conf somehow, so that things would work correctly.
However, it seems like the system is hard-coded to expect the built-in stub resolver
nucc1@sol: /etc/systemd$ ls -l /etc/resolv.conf systemd/ resolve/ stub-resolv. conf
lrwxrwxrwx 1 root root 39 Apr 26 19:07 /etc/resolv.conf -> ../run/
Netplan is updating /run/systemd/ resolve/ resolv. conf
nucc1@sol: /etc/systemd$ cat /run/systemd/ resolve/ resolv. conf resolved( 8). Do not edit. resolved. service( 8) for details about the supported modes of
# This file is managed by man:systemd-
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-
# operation for /etc/resolv.conf.
nameserver 1.1.1.1
nameserver 8.8.8.8
nameserver 8.8.4.4
---
shouldn't systemd-resolvd or something, update the /etc/resolv.conf symlink when it's clear that the stub resolver is not in use?
apologies if this is the wrong place and I need to open a new bug instead.