netplan can not rename device names

Bug #1758820 reported by Thomas Aichinger
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Netplan
New
Undecided
Unassigned

Bug Description

I use Ubuntu 17.10 Server 64bit with latest updates. (Fresh installation)

apt-cache policy netplan
netplan:
  Installed: (none)
  Candidate: 1.10.1-5
  Version table:
     1.10.1-5 500
        500 http://at.archive.ubuntu.com/ubuntu artful/universe amd64 Packages

 apt-cache policy ifupdown
ifupdown:
  Installed: 0.8.16ubuntu2
  Candidate: 0.8.16ubuntu2
  Version table:
 *** 0.8.16ubuntu2 500
        500 http://at.archive.ubuntu.com/ubuntu artful/main amd64 Packages
        100 /var/lib/dpkg/status

systemd-networkd is installed and used
Network-Manager is not installed.
/etc/network/interfaces is untouched after installation

Netplan does not set device name configured in /etc/netplan/01-netcfg.yaml

Here my .yaml

network:
  version: 2
  renderer: networkd
  ethernets:
    lan:
      match:
        macaddress: 00:12:34:56:29:e8
      set-name: lan
      dhcp4: false
      dhcp6: false
      accept-ra: false
      addresses:
        - 10.10.0.48/24
        - 1701:5740:5000:3301::48/64

I had to switch back to predictable device names like "eth0" in /etc/default/grub with
GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 biosdevname=0" and update-grub.

After this change and reboot, the name is set properly but the network remains still unconfigured.
You have to login with console and type 'netplan apply' or 'systemctl restart systemd-networkd'.
This command will configure the network.

Funny thing about this behavior. If you reboot the system more often, out of 10 times one time network gets configured properly. I guess this is a timing issue.

'systemd-analize blame' shows what services are started at what time. I found out this difference.
With unconfigured network systemd-networkd is started at about 34ms
With configured network systemd-networkd is usually started at about 400ms

I played around a lot with timing in systemd-network.service but that did not change the thing.

Tags: netplan
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Moving this bug to the netplan project since the Ubuntu package got renamed from 'nplan' to 'netplan.io'.

affects: nplan (Ubuntu) → netplan
Revision history for this message
Daniel Axtens (daxtens) wrote :

Hi,

I also hit this issue in LP: #1770082 - it turns out to be a systemd issue. I think the issues are duplicates.

Could you please test the latest netplan.io? It should be sufficient to fix your issue as it uses a more reliable renaming mechanism. If not, then we can debug further.

Regards,
Daniel

Revision history for this message
Thomas Aichinger (taich) wrote :

I have "Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-29-generic x86_64)" with all upgrades.

I tried /etc/netplan/50-cloud-init.yaml

network:
    version: 2
    renderer: networkd
    ethernets:
        lan:
            match:
               macaddress: 00:50:56:a8:29:e8
            set-name: lan
            addresses:
            - 10.10.0.48/24
            - 1701:5740:5000:3301::48/64

It looks good now.

Regards
Thomas

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.