Netplan does not prune all routing rules

Bug #2047833 reported by Miguel Prata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
Confirmed
Undecided
Unassigned

Bug Description

Considering a Netplan yaml with the following routes defined on two of its interfaces:

routes:
- metric: 100
  on-link: true
  table: 2
  to: default
  via: 10.10.91.57
routing-policy:
- from: 10.10.91.61
  table: 2

and

routes:
- metric: 100
  on-link: true
  table: 1
  to: default
  via: 10.10.91.49
routing-policy:
- from: 10.10.91.53
table: 1

The respective rules will be created and visible, via ip rule, such as:

0: from 10.10.91.53 lookup 1
0: from 10.10.91.61 lookup 2

If then one applies a new Netplan configuration which contains for instance only one of the routes above, the respective rule will not be removed from the routing policy db and it will still show up exactly as before.

(The routing tables are indeed cleared).

This can easily cause networking problems as the interfaces can end up using different routes than intended.

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

Hello, thank you for your report.

I can confirm "netplan apply" will not clean routing rules automatically. It happens because these rules are not tied to the interface like routes so when netplan apply cleans up the interfaces the routes are automatically removed by the system.

We'll need to investigate how it can be done safely.

tags: added: foundations-todo
Changed in netplan:
status: New → Confirmed
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.