[Bug 1750884] Re: [2.4, bionic] /etc/resolv.conf not configured correctly in Bionic, leads to no DNS resolution
Ryan Harper
1750884 at bugs.launchpad.net
Thu Feb 22 21:32:10 UTC 2018
I gave the "loopback" trick a go like so:
root at b1:~# cat /etc/systemd/network/10-netplan-lo.network
[Match]
Name=lo
[Network]
Address=127.0.0.1
DNS=10.90.90.1
Domains=maaslab maas
root at b1:~# networkctl status --all
● 1: lo
Link File: n/a
Network File: /etc/systemd/network/10-netplan-lo.network
Type: loopback
State: carrier (configured)
Address: 127.0.0.1
::1
DNS: 10.90.90.1
Search Domains: maaslab
maas
● 38: eth0
Link File: n/a
Network File: /run/systemd/network/10-netplan-eth0.network
Type: ether
State: routable (configured)
HW Address: 00:16:3e:4c:5b:4b (Xensource, Inc.)
Address: 10.8.107.71
fe80::216:3eff:fe4c:5b4b
Gateway: 10.8.107.1
DNS: 10.8.107.1
Search Domains: lxd
root at b1:~# systemd-resolve --status --no-pager
Global
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
17.172.in-addr.arpa
18.172.in-addr.arpa
19.172.in-addr.arpa
20.172.in-addr.arpa
21.172.in-addr.arpa
22.172.in-addr.arpa
23.172.in-addr.arpa
24.172.in-addr.arpa
25.172.in-addr.arpa
26.172.in-addr.arpa
27.172.in-addr.arpa
28.172.in-addr.arpa
29.172.in-addr.arpa
30.172.in-addr.arpa
31.172.in-addr.arpa
corp
d.f.ip6.arpa
home
internal
intranet
lan
local
private
test
Link 38 (eth0)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNS Servers: 10.8.107.1
DNS Domain: lxd
networkctl processed the .network file but systemd-resolved didn't seem to notice it.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1750884
Title:
[2.4, bionic] /etc/resolv.conf not configured correctly in Bionic,
leads to no DNS resolution
Status in cloud-init:
New
Status in MAAS:
Triaged
Status in nplan package in Ubuntu:
New
Status in systemd package in Ubuntu:
New
Bug description:
When deploying Bionic, /etc/resolv.conf is not configured correctly,
which leads to no DNS resolution. In the output below, you will see
that netplan config is correctly to the 10.90.90.1 nameserver, but in
resolv.conf that's a local address.
Resolv.conf should really be configured to use the provided DNS
server(s). That said, despite that fact, DNS resolution doesn't work
with the local address.
Bionic
------
ubuntu at node01:~$ cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
version: 2
ethernets:
enp0s25:
match:
macaddress: b8:ae:ed:7d:17:d2
mtu: 1500
nameservers:
addresses:
- 10.90.90.1
search:
- maaslab
- maas
set-name: enp0s25
bridges:
br0:
addresses:
- 10.90.90.3/24
gateway4: 10.90.90.1
interfaces:
- enp0s25
parameters:
forward-delay: 15
stp: false
ubuntu at node01:~$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 127.0.0.53
search maaslab maas
ubuntu at node01:~$ ping google.com
ping: google.com: Temporary failure in name resolution
[...]
ubuntu at node01:~$ sudo vim /etc/resolv.conf
ubuntu at node01:~$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 10.90.90.1
search maaslab maas
ubuntu at node01:~$ ping google.com
PING google.com (172.217.0.174) 56(84) bytes of data.
64 bytes from mia09s16-in-f14.1e100.net (172.217.0.174): icmp_seq=1 ttl=52 time=4.46 ms
64 bytes from mia09s16-in-f14.1e100.net (172.217.0.174): icmp_seq=2 ttl=52 time=4.38 ms
=============================
Xenial
==============================
ubuntu at node05:~$ cat /etc/network/interfaces.d/50-cloud-init.cfg
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
iface lo inet loopback
dns-nameservers 10.90.90.1
dns-search maaslab maas
auto enp0s25
iface enp0s25 inet static
address 10.90.90.162/24
gateway 10.90.90.1
mtu 1500
ubuntu at node05:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.90.90.1
search maaslab maas
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1750884/+subscriptions
More information about the foundations-bugs
mailing list