virtual devices not destroyed when config removed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nplan (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The man page for netplan says:
Virtual devices
I create the following file as /etc/netplan/
network:
version: 2
ethernets:
ens7:
match:
ens8:
match:
bridges:
br0:
- 10.10.10.2/24
I run netplan generate, netplan apply, and see the bridge as expected:
$ ip l
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,
link/ether 52:54:00:f0:bc:02 brd ff:ff:ff:ff:ff:ff
5: ens7: <BROADCAST,
link/ether 52:54:00:98:18:9a brd ff:ff:ff:ff:ff:ff
6: ens8: <BROADCAST,
link/ether 52:54:00:80:00:9d brd ff:ff:ff:ff:ff:ff
7: br0: <BROADCAST,
link/ether 0e:e3:1c:83:f8:e8 brd ff:ff:ff:ff:ff:ff
Then I remove the file, and run netplan generate and netplan apply again. The phrase 'fully under the control of the config file(s)' leads me to expect the bridge will now disappear.
It does not: the output of ip l is unchanged.
However, it does go away after a reboot.
This should preferably be changed so that the device does go away with netplan apply. Alternatively it should be well documented that virtual devices will be created but not destroyed by netplan.
This can be observed in the version in artful and from git sha ab9d26eab904880 abd10158700dae5 7923044f49.