Devices unexpectedly renamed by netplan apply

Bug #1753868 reported by Daniel Axtens
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Netplan
Fix Released
Undecided
Unassigned

Bug Description

I have ens8 and ens9, currently unconfigured:

3: ens8: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 52:54:00:f9:e9:dd brd ff:ff:ff:ff:ff:ff
4: ens9: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 52:54:00:56:0d:ce brd ff:ff:ff:ff:ff:ff

I drop in the following yaml file:

network:
    version: 2
    ethernets:
        ens8:
            match:
                macaddress: 52:54:00:f9:e9:dd
            mtu: 1280
        ens9:
            match:
                macaddress: 52:54:00:56:0d:ce
            mtu: 1280
    bridges:
        br0:
            interfaces: [ens8, ens9]
            addresses:
                - 10.10.10.2/24

I then run netplan generate/netplan apply.

I observe that the links have been unexpectedly and undesirably renamed - ens8 has become eth0, and ens9 has become eth1. The mac addresses are unchanged:

5: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1280 qdisc fq_codel master br0 state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:f9:e9:dd brd ff:ff:ff:ff:ff:ff
6: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1280 qdisc fq_codel master br0 state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:56:0d:ce brd ff:ff:ff:ff:ff:ff
7: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1280 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

I think this is some weird side-effect of the unplug/replug thing netplan does, but I don't know how to debug it further.

Adding a set-name stanza and redoing generate/apply does *not* rename the interface. (Their indexes also don't change, so I assume something is suppressing a further plug cycle?)

Rebooting works as expected - the bridge is created and the devices are not renamed.

Daniel Axtens (daxtens)
description: updated
Revision history for this message
Daniel Axtens (daxtens) wrote :

This goes away with replug in 0.39, so calling it fix committed for now.

Changed in netplan:
status: New → Fix Committed
Changed in netplan:
status: Fix Committed → Fix Released
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.