[Bug 1746862] [NEW] virtual devices not destroyed when config removed

Daniel Axtens daniel.axtens at canonical.com
Fri Feb 2 04:16:29 UTC 2018


Public bug reported:

The man page for netplan says:

Virtual devices
              (Examples: veth, bridge, bond) These are fully under the control of the config file(s) and the network stack.  I.  e.   these  devices are  being  created  instead  of matched.  Thus match: and set-name: are not applicable for these, and the ID field is the name of the created virtual device.

I create the following file as /etc/netplan/10-bridge.yaml:

network:
    version: 2
    ethernets:
        ens7:
            match:
                macaddress: 52:54:00:98:18:9a
        ens8:
            match:
                macaddress: 52:54:00:80:00:9d
    bridges:
        br0:
           interfaces: [ens7, ens8]
           addresses:
               - 10.10.10.2/24

I run netplan generate, netplan apply, and see the bridge as expected:

$ ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:f0:bc:02 brd ff:ff:ff:ff:ff:ff
5: ens7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:98:18:9a brd ff:ff:ff:ff:ff:ff
6: ens8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:80:00:9d brd ff:ff:ff:ff:ff:ff
7: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    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.

** Affects: nplan (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to nplan in Ubuntu.
https://bugs.launchpad.net/bugs/1746862

Title:
  virtual devices not destroyed when config removed

Status in nplan package in Ubuntu:
  New

Bug description:
  The man page for netplan says:

  Virtual devices
                (Examples: veth, bridge, bond) These are fully under the control of the config file(s) and the network stack.  I.  e.   these  devices are  being  created  instead  of matched.  Thus match: and set-name: are not applicable for these, and the ID field is the name of the created virtual device.

  I create the following file as /etc/netplan/10-bridge.yaml:

  network:
      version: 2
      ethernets:
          ens7:
              match:
                  macaddress: 52:54:00:98:18:9a
          ens8:
              match:
                  macaddress: 52:54:00:80:00:9d
      bridges:
          br0:
             interfaces: [ens7, ens8]
             addresses:
                 - 10.10.10.2/24

  I run netplan generate, netplan apply, and see the bridge as expected:

  $ ip l
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
      link/ether 52:54:00:f0:bc:02 brd ff:ff:ff:ff:ff:ff
  5: ens7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT group default qlen 1000
      link/ether 52:54:00:98:18:9a brd ff:ff:ff:ff:ff:ff
  6: ens8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT group default qlen 1000
      link/ether 52:54:00:80:00:9d brd ff:ff:ff:ff:ff:ff
  7: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
      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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nplan/+bug/1746862/+subscriptions



More information about the foundations-bugs mailing list