Netplan apply will not move Vlans
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
New
|
Undecided
|
Unassigned |
Bug Description
Ubuntu version: 19.04 (last stable)
Netplan version: 1.10.1-6
Requirements:
A machine with two or more network interfaces.
Possible requirements:
A machine with four or more network interfaces.
To reproduce:
1) Create 2 bonds between 2 interfaces.
2) Create a VLAN on a network bond, or possibly it may also fail when creating directly on an interface, using a yaml file, then using 'netplan apply'.
3) The vlan will show up in the output of 'ip link list' (check).
4) Then, try moving the vlan to another interface. In my case, I changed "bond0" to "bond1" in my file
/etc/netplan/
network:
vlans:
vlan90:
id: 90
link: bond0
was changed to:
network:
vlans:
vlan90:
id: 90
link: bond1
5) Finally, use 'netplan apply' again afterwards, and
6) check with 'ip link list'.
Expected result:
We see "vlan90@bond1" in the output.
Actual result:
We see "vlan90@bond0" in the output.
Workaround (tested):
1) 'change your files'
2) ip link del vlan90
3) netplan apply
Another workaround that will do the trick:
1) 'change your files'
2) reboot the machine
In other words, manually deleting the interface makes things work. I suspect netplan doesn't properly check whether a virtual interface changed its underlying physical interface, and assumes vlan90 was unchanged, when in fact, the configuration changed.
The problem may only occur with vlans on bonded network interfaces. I have not tested with vlans on directly accessed network interfaces.