Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 497954 - sys-fs/udev-208: unannounced drop of persistent network interface names for virtio devices
Summary: sys-fs/udev-208: unannounced drop of persistent network interface names for v...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal minor (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-13 00:30 UTC by Sa Wu
Modified: 2014-01-14 08:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
udev rules file (81-net-name-mac.rules,285 bytes, text/plain)
2014-01-13 01:48 UTC, Mike Gilbert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sa Wu 2014-01-13 00:30:12 UTC
My headless virtual server running hardened gentoo on amd64 as kvm guest got unreachable after recent
    emerge @world
including
    sys-fs/udev-208
I could fix it and trace the problem back to the persistent network names introduced with >=sys-fs/udev-200.
Apparently someone decided to drop them for virtio devices somewhere after
    sys-fs/udev-204
and told no one.
An eselect news item or so would have been nice.

Network config with enx00163e069316 doesn't work anymore.
Now it's just eth0 again.

Reproducible: Always

Steps to Reproduce:
1. Follow gentoo handbook/udev upgrade guide
1. udevadm test-builtin net_id /sys/class/net/eth0 2> /dev/null
   or whatever it's called
2. setup network config with ID_NET_NAME_MAC
   or whatever should take precedence according to udev upgrade guide
3. reboot
4. ls /sys/class/net
Actual Results:  
ls output: eth0 lo

Expected Results:  
ls output: enx00163e069316 lo
or whatever the udevadm command listed

udevadm test-builtin net_id /sys/class/net/eth0 /dev/null
calling: test-builtin
=== trie on-disk ===
tool version:          208
file size:         5860871 bytes
header size             80 bytes
strings            1295087 bytes
nodes              4565704 bytes
load module index
ID_NET_NAME_MAC=enx00163e069316
ID_OUI_FROM_DATABASE=Xensource, Inc.
unload module index
Comment 1 Mike Gilbert gentoo-dev 2014-01-13 01:05:53 UTC
> An eselect news item or so would have been nice.

I suspect that you are the first person to report this; it is difficult to write a news item for a problem that you do not know exists.
Comment 2 Mike Gilbert gentoo-dev 2014-01-13 01:11:38 UTC
Also, it does not appear that ID_NET_NAME_MAC has ever been used in the default 80-net-name-slot.rules file.

Did you set up a custom rule?
Comment 3 Sa Wu 2014-01-13 01:39:48 UTC
No, as far as I can remember, I never tweaked or set up any udev rules.
I just followed the udev upgrade guide when the update to sys-fs/udev-200 came up.
ID_NET_NAME_MAC was the only thing udevadm gave me.
The config using it worked until world update last week.
I still have the init.d symlink and /etc/conf.d/net entry just in case.
Comment 4 Mike Gilbert gentoo-dev 2014-01-13 01:48:35 UTC
Created attachment 367760 [details]
udev rules file

Hmm. I still don't recall udev using ID_NET_NAME_MAC out-of-the-box, and some grepping through various git revs doesn't turn up anything.

However, you could drop this file in /etc/udev/rules.d to enable that behavior.
Comment 5 Mike Gilbert gentoo-dev 2014-01-13 03:20:30 UTC
Udev team: Unless you have any other ideas, I guess this can be closed.
Comment 6 Sa Wu 2014-01-13 11:55:53 UTC
Thank you.
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2014-01-14 08:50:45 UTC
ID_NET_NAME_MAC has never been used by default, where as Comment #0 falsely suggests it was in use before

no bug here, just documented behavior:

http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

Quoting from above page:

"What precisely has changed in v197?

[ .. ]
4. Names incorporating the interfaces's MAC address (example: enx78e7d1ea46da)
   Classic, unpredictable kernel-native ethX naming (example: eth0)

By default, systemd v197 will now name interfaces following policy 1) if that information from the firmware is applicable and available, falling back to 2) if that information from the firmware is applicable and available, falling back to 3) if applicable, falling back to 5) in all other cases. Policy 4) is not used by default, but is available if the user chooses so."