netplan generates duplicate dns
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Fix Released
|
Low
|
Unassigned |
Bug Description
Hello,
I have a server with Ubuntu 22.04LTS
Netplan version: netplan.io 0.104-0ubuntu2
When bonds section upper than ethernets section I see duplicate bonds.ifname.
# netplan get
network:
version: 2
renderer: networkd
ethernets:
ens3f0:
match:
macaddress: "some-mac"
dhcp4: false
set-name: "ens3f0"
ens2f0:
match:
macaddress: "some-mac"
dhcp4: false
set-name: "ens2f0"
bonds:
aggi:
addresses:
- "10.17.0.73/26"
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
- 8.8.8.8
- 8.8.4.4
search:
- example.com
- example.com
dhcp4: false
interfaces:
- ens2f0
- ens3f0
parameters:
mode: "802.3ad"
up-delay: "200"
down-delay: "200"
lacp-rate: "slow"
routes:
- to: "default"
via: "10.17.0.67"
But when I swap sections everything is fine:
# netplan get
network:
version: 2
renderer: networkd
ethernets:
ens3f0:
match:
macaddress: "some-mac"
dhcp4: false
set-name: "ens3f0"
ens2f0:
match:
macaddress: "some-mac"
dhcp4: false
set-name: "ens2f0"
bonds:
aggi:
addresses:
- "10.17.0.73/26"
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
search:
- example.com
dhcp4: false
interfaces:
- ens2f0
- ens3f0
parameters:
mode: "802.3ad"
up-delay: "200"
down-delay: "200"
lacp-rate: "slow"
routes:
- to: "default"
via: "10.17.0.67"
Changed in netplan: | |
status: | New → Triaged |
importance: | Undecided → Low |
tags: | added: fr-3537 |
Changed in netplan: | |
status: | Triaged → In Progress |
Hi, thanks for your bug report.
I can confirm that the problem still exists on netplan.io 0.106.
Here is a simpler reproducer:
$ cat /tmp/fakeroot/ etc/netplan/ 90-configs. yaml
network:
bonds:
aggi:
nameservers:
addresses:
- 8.8.8.8
search:
- example.com
interfaces:
- ens3f0
ethernets:
ens3f0: {}
$ netplan get --root-dir /tmp/fakeroot/
network:
version: 2
ethernets:
ens3f0: {}
bonds:
aggi:
nameservers:
addresses:
- 8.8.8.8
- 8.8.8.8
search:
- example.com
- example.com
interfaces:
- ens3f0
And indeed the duplication doesn't happen if "ethernets" is defined before "bonds".