Netplan not merging routes in separate files

Bug #2015022 reported by Husam Bilal
This bug report is a duplicate of:  Bug #2013532: netplan ignores routes. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
New
Undecided
Unassigned

Bug Description

Adding extra static routes in a separate configuration file doesn't seem to get merged.

Release info:
```
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
```

Example config files:
```
# /etc/netplan/00-config.yaml
network:
  version: 2
  ethernets:
    ens5:
      dhcp4: true
      dhcp6: false
      dhcp4-overrides:
        use-routes: false
      routes:
        - to: 172.31.0.0/16
          via: 172.31.0.1
```
```
# /etc/netplan/10-config.yaml
network:
  version: 2
  ethernets:
    ens5:
      routes:
        - to: 172.18.0.0/24
          via: 172.31.1.240
```

Running `netplan --debug get` returns the following output:
```
** (process:1249606): DEBUG: 00:42:14.001: starting new processing pass
** (process:1249606): DEBUG: 00:42:14.001: ens5: adding new route
** (process:1249606): DEBUG: 00:42:14.001: We have some netdefs, pass them through a final round of validation
** (process:1249606): DEBUG: 00:42:14.001: ens5: setting default backend to 1
** (process:1249606): DEBUG: 00:42:14.001: Configuration is valid
network:
  version: 2
  ethernets:
    ens5:
      dhcp4: true
      dhcp4-overrides:
        use-routes: false
      dhcp6: false
      routes:
      - to: "172.31.0.0/16"
        via: "172.31.0.1"
```

Husam Bilal (husam212)
no longer affects: netplan.io (Ubuntu)
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.