Netplan is not applying DNS configuration

Bug #2062200 reported by Giuseppe Petralia

This bug report will be marked for expiration in 31 days if no further activity occurs. (find out why)

10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
Incomplete
Undecided
Unassigned

Bug Description

This is happening on Ubuntu Jammy netplan version 0.106.1-7ubuntu0.22.04.2

Netplan is not applying the DNS configuration.

I have the following configuration:

```
network:
  version: 2
  ethernets:
    eth0:
      match:
        macaddress: 00:16:3e:27:ef:73
      addresses:
      - 192.168.2.140/24
      gateway4: 192.168.2.1
      nameservers:
        search: [mydomain.com, maas]
        addresses: [192.168.1.14, 192.168.2.10, 192.168.1.13, 192.168.1.11, 192.168.1.12]
```

After running `netplan apply` I don't have any dns configured.

Downgrading netplan to 0.105-0ubuntu2~22.04.3 make it working again.

Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

Hi,

is DNS the only thing that doesn't get applied?

Your configuration works fine for me in a Jammy VM in LXD.

Is this a container for any chance?

Revision history for this message
Giuseppe Petralia (peppepetra) wrote :

This is happening on an LXD.

We believe we are hitting https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2041480

Commenting the following lines:

      match:
        macaddress: 00:16:3e:27:ef:73

make it working as well on version 0.106.1-7ubuntu0.22.04.2

Revision history for this message
Lukas Märdian (slyon) wrote :

So is the macaddress matching really needed for your usecase (it's meant to be used with physical hardware)? Interface names should be relatively predictable in an LXD container, anyway. And using those makes it work, as suggested in comment #2.

Changed in netplan:
status: New → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.