Predictable network interface names re-enabled after update on server image

Bug #1585335 reported by James
40
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Ubuntu Pi Flavour Maker
Confirmed
Undecided
Unassigned

Bug Description

Hello...

We're working with the 16.04 Server (minimal) image here. After initial install, predictable network interface names are disabled as advertised. However, after doing an apt update/upgrade, they return (I'm guessing) do to the recent systemd update.

I see /boot/cmdline.txt still contains "net.ifnames=0 biosdevname=0", but it doesn't seem to have any effect. I've disabled them again by adding an entry via /etc/udev/rules.d/70-persistent-net.rules.

I just tested this with a fresh image, booting to verify eth0, then apt update/upgrade and reboot to see eth0 removed and an enx------------ mac based interface in its place.

Thanks!

Revision history for this message
Ricardo (gizmotemp) wrote :

Hello,
after some digging I found the origin of the "problem"

When you make apt-get update/upgrade you will update some packages and one of that packages is the udev.

After the update of udev, it updates the file /lib/udev/rules.d/73-special-net-names.rules adding the following line:
ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="", ATTR{address}=="?[014589cd]:*", IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"

If you comment this line everything will work as before!

Revision history for this message
Danilo Falcão (fcon) wrote :

Commenting the line worked for me. +1

Changed in ubuntu-pi-flavour-maker:
status: New → Confirmed
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

The line no longer exists in that file. It is in 73-usb-net-by-mac.rules. Commenting it makes no difference. Not surprising since it is surrounded by a check against net.ifnames=0. But this bug still happens after upgrading the system.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

FWIW I'm using the official image, not the one made by the flavour maker.

Revision history for this message
James (k-james-d) wrote :

May not be the "best" answer, but I'm just adding /etc/udev/rules.d/70-persistent-net.rules with the following:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth0", NAME="eth0"

And not touching changes made by that packages.

Revision history for this message
Simon Marchi (simon-marchi) wrote :

I built a 16.04 minimal image from the scripts, and had this behaviour too (predictable interface name enabled). Creating the link as follows (and rebooting) reverted to eth0:

  ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules

Source: https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

Revision history for this message
Tim Jardim (tcjx14me) wrote :

@James Pooton

Your suggestion is the one that worked for me
adding /etc/udev/rules.d/70-persistent-net.rules with the following:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth0", NAME="eth0"

The other suggestions did not work for me.

- The name change is more of a nuisance than anything. bringing the adapter up and either requesting a new IP via DHCP or assigning a static IP will also work. Changing functional scripts would be a pain however.

Thanks again all
Tim Jardim

Revision history for this message
Shuhao (shuhao) wrote :

I find that adding the /etc/udev/rules.d/80-net-setup-link.rules file does in fact work. However, the system hangs during boot when not plugged into to ethernet.

Revision history for this message
nikolka-kapustin (nikolka-kapustin) wrote :

The same issue for me. Another topic for rasp forum:https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=23400

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.