Debian 10/9/8 DNS configuration bug
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Medium
|
Unassigned |
Bug Description
I use cloud-init with NoCloud data source for configuring my VM's and got strange bug with DNS configuration on official Debian images like https:/
My network config:
```
version: 2
ethernets:
eth0:
set-name: eth0
match:
macaddress: <MAC address>
addresses: [ <IP address> ]
gateway4: <GATEWAY ADDRESS>
nameservers:
addresses: [8.8.8.8,8.8.4.4]
```
After creating new VM I got next configuration in /etc/network/
```
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.52.240.11/16
dns-nameservers 8.8.8.8 8.8.4.4
gateway 10.52.1.1
```
But /etc/resolv.conf contains:
```
nameserver 127.0.0.1
```
Which leads to the fact that I can’t resolve any domain name, for example:
```
# ping google.com
ping: google.com: Temporary failure in name resolution
```
description: | updated |
Thanks for filing the bug.
Cloud-init itself does not render /etc/resolv.conf on Ubuntu/Debian; In Ubuntu, the resolvconf package is installed which handles maintain /etc/resolv.conf.
Looking at:
https:/ /cdimage. debian. org/cdimage/ openstack/ current- 10/debian- 10-openstack- amd64-packages. list
resolvconf package is not present, hence the bug. I would suggest that the images include this package.
That said, cloud-init could detect if resolvconf is not present and render resolv.conf directly.