PCI RoCE Interface could not be renamed from default name with link file

Bug #1602737 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu on IBM z Systems
Fix Released
Undecided
Canonical Server
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Yakkety
Fix Released
Undecided
Unassigned
systemd (Ubuntu)
Invalid
Undecided
Skipper Bug Screeners
Xenial
Invalid
Undecided
Unassigned
Yakkety
Invalid
Undecided
Skipper Bug Screeners

Bug Description

== Comment: #0 - Helmut Grauer <email address hidden> - 2016-07-13 09:05:27 ==
Try to rename PCI Roce Interface with .link file

root@s35lp02:/etc/systemd/network# cat 10-net.link
[Match]
Path=pci-0000:00:00.0*
MACAddress=82:01:14:07:85:70

[Link]
Name=hug0
root@s35lp02:/etc/systemd/network#

do a reboot and journalctl show old interface name for RoCE PCI Interface

Jul 13 14:39:40 s35lp02 kernel: mlx4_en 0001:00:00.0: Activating port:1
Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 1: Using 32 TX rings
Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 1: Using 4 RX rings
Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 1: frag:0 - size:1522 prefix:0 stride:1536
Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 1: Initializing port
Jul 13 14:39:40 s35lp02 kernel: mlx4_en 0001:00:00.0: Activating port:2
Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 2: Using 32 TX rings
Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 2: Using 4 RX rings
Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 2: frag:0 - size:1522 prefix:0 stride:1536
Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 2: Initializing port
Jul 13 14:39:40 s35lp02 kernel: mlx4_core 0000:00:00.0 enp0s0: renamed from eth0
Jul 13 14:39:40 s35lp02 kernel: mlx4_core 0000:00:00.0 enp0s0d1: renamed from eth1
Jul 13 14:39:40 s35lp02 kernel: mlx4_core 0001:00:00.0 enP1p0s0d1: renamed from eth3
Jul 13 14:39:40 s35lp02 kernel: mlx4_core 0001:00:00.0 enP1p0s0: renamed from eth2
Jul 13 14:39:40 s35lp02 kernel: EXT4-fs (dasda1): mounting ext3 file system using the ext4 subsystem
Jul 13 14:39:40 s35lp02 kernel: EXT4-fs (dasda1): mounted filesystem with ordered data mode. Opts: (null)

udevadm test show the following output

oot@s35lp02:/etc/systemd/network# udevadm test /class/net/enp0s0
calling: test
version 229
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

=== trie on-disk ===
tool version: 229
file size: 6841701 bytes
header size 80 bytes
strings 1755245 bytes
nodes 5086376 bytes
Load module index
timestamp of '/etc/systemd/network' changed
Skipping overridden file: /usr/lib/systemd/network/99-default.link.
Skipping overridden file: /usr/lib/systemd/network/10-net.link.
Skipping overridden file: /lib/systemd/network/99-default.link.
Skipping overridden file: /lib/systemd/network/10-net.link.
Parsed configuration file /etc/systemd/network/99-default.link
Parsed configuration file /lib/systemd/network/90-mac-for-usb.link
Parsed configuration file /etc/systemd/network/11-net.link
Parsed configuration file /etc/systemd/network/10-net.link
Created link configuration context.
timestamp of '/etc/udev/rules.d' changed
Reading rules file: /lib/udev/rules.d/40-vm-hotadd.rules
Reading rules file: /lib/udev/rules.d/40-z90crypt.rules
Reading rules file: /etc/udev/rules.d/41-cio-ignore.rules
Reading rules file: /etc/udev/rules.d/41-dasd-eckd-0.0.af06.rules
Reading rules file: /etc/udev/rules.d/41-dasd-eckd-0.0.af07.rules
Reading rules file: /etc/udev/rules.d/41-generic-ccw-0.0.0009.rules
Reading rules file: /etc/udev/rules.d/41-qeth-0.0.b100.rules
Reading rules file: /etc/udev/rules.d/41-qeth-0.0.f500.rules
Reading rules file: /lib/udev/rules.d/50-firmware.rules
Reading rules file: /lib/udev/rules.d/50-udev-default.rules
Reading rules file: /lib/udev/rules.d/55-dm.rules
Reading rules file: /lib/udev/rules.d/55-scsi-sg3_id.rules
Reading rules file: /lib/udev/rules.d/56-dm-mpath-lvm.rules
Reading rules file: /lib/udev/rules.d/56-lvm.rules
Reading rules file: /lib/udev/rules.d/58-scsi-sg3_symlink.rules
Reading rules file: /lib/udev/rules.d/59-dasd.rules
Reading rules file: /lib/udev/rules.d/60-block.rules
Reading rules file: /lib/udev/rules.d/60-cdrom_id.rules
Reading rules file: /lib/udev/rules.d/60-crda.rules
Reading rules file: /lib/udev/rules.d/60-drm.rules
Reading rules file: /lib/udev/rules.d/60-evdev.rules
Reading rules file: /lib/udev/rules.d/60-gnupg.rules
Reading rules file: /lib/udev/rules.d/60-persistent-alsa.rules
Reading rules file: /lib/udev/rules.d/60-persistent-input.rules
Reading rules file: /lib/udev/rules.d/60-persistent-storage-dm.rules
Reading rules file: /lib/udev/rules.d/60-persistent-storage-tape.rules
Reading rules file: /lib/udev/rules.d/60-persistent-storage.rules
Reading rules file: /lib/udev/rules.d/60-persistent-v4l.rules
Reading rules file: /lib/udev/rules.d/60-readahead.rules
Reading rules file: /lib/udev/rules.d/60-serial.rules
Reading rules file: /lib/udev/rules.d/60-vlan-network-interface.rules
Reading rules file: /lib/udev/rules.d/61-persistent-storage-android.rules
Reading rules file: /lib/udev/rules.d/64-btrfs.rules
Reading rules file: /lib/udev/rules.d/69-lvm-metad.rules
Reading rules file: /lib/udev/rules.d/70-mouse.rules
Reading rules file: /lib/udev/rules.d/70-power-switch.rules
Reading rules file: /lib/udev/rules.d/70-uaccess.rules
Reading rules file: /lib/udev/rules.d/71-power-switch-proliant.rules
Reading rules file: /lib/udev/rules.d/71-seat.rules
Reading rules file: /lib/udev/rules.d/73-seat-late.rules
Reading rules file: /lib/udev/rules.d/73-special-net-names.rules
Reading rules file: /lib/udev/rules.d/75-net-description.rules
Reading rules file: /lib/udev/rules.d/75-probe_mtd.rules
Reading rules file: /lib/udev/rules.d/78-graphics-card.rules
Reading rules file: /lib/udev/rules.d/78-sound-card.rules
Reading rules file: /lib/udev/rules.d/80-debian-compat.rules
Reading rules file: /lib/udev/rules.d/80-drivers.rules
Reading rules file: /lib/udev/rules.d/80-ifupdown.rules
Reading rules file: /lib/udev/rules.d/80-net-setup-link.rules
Reading rules file: /lib/udev/rules.d/85-hdparm.rules
Reading rules file: /lib/udev/rules.d/85-keyboard-configuration.rules
Reading rules file: /lib/udev/rules.d/85-regulatory.rules
Reading rules file: /lib/udev/rules.d/95-kpartx.rules
Reading rules file: /lib/udev/rules.d/99-systemd.rules
rules contain 49152 bytes tokens (4096 * 12 bytes), 15909 bytes strings
2392 strings (30411 bytes), 1605 de-duplicated (15290 bytes), 788 trie nodes used
RUN 'vlan-network-interface' /lib/udev/rules.d/60-vlan-network-interface.rules:1
IMPORT builtin 'net_id' /lib/udev/rules.d/75-net-description.rules:6
IMPORT builtin 'hwdb' /lib/udev/rules.d/75-net-description.rules:12
RUN 'ifupdown-hotplug' /lib/udev/rules.d/80-ifupdown.rules:5
IMPORT builtin 'path_id' /lib/udev/rules.d/80-net-setup-link.rules:5
IMPORT builtin 'net_setup_link' /lib/udev/rules.d/80-net-setup-link.rules:9
Config file /etc/systemd/network/10-net.link applies to device enp0s0
RUN '/lib/systemd/systemd-sysctl --prefix=/net/ipv4/conf/$name --prefix=/net/ipv4/neigh/$name --prefix=/net/ipv6/conf/$name --prefix=/net/ipv6/neigh/$name' /lib/udev/rules.d/99-systemd.rules:51
created db file '/run/udev/data/n2' for '/devices/pci0000:00/0000:00:00.0/net/enp0s0'
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:00.0/net/enp0s0
ID_BUS=pci
ID_MODEL_FROM_DATABASE=MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function]
ID_MODEL_ID=0x1004
ID_NET_DRIVER=mlx4_en
ID_NET_LINK_FILE=/etc/systemd/network/10-net.link
ID_NET_NAME_MAC=enx820114078570
ID_NET_NAME_PATH=enp0s0
ID_PATH=pci-0000:00:00.0
ID_PATH_TAG=pci-0000_00_00_0
ID_PCI_CLASS_FROM_DATABASE=Network controller
ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller
ID_VENDOR_FROM_DATABASE=Mellanox Technologies
ID_VENDOR_ID=0x15b3
IFINDEX=2
INTERFACE=enp0s0
SUBSYSTEM=net
SYSTEMD_ALIAS=/sys/subsystem/net/devices/enp0s0
TAGS=:systemd:
USEC_INITIALIZED=5917164
run: 'vlan-network-interface'
run: 'ifupdown-hotplug'
run: '/lib/systemd/systemd-sysctl --prefix=/net/ipv4/conf/enp0s0 --prefix=/net/ipv4/neigh/enp0s0 --prefix=/net/ipv6/conf/enp0s0 --prefix=/net/ipv6/neigh/enp0s0'
Unload module index
Unloaded link configuration context.
root@s35lp02:/etc/systemd/network#

for a qeth network interface it works fine
I will attach sosreport as well to the Bugzilla

Revision history for this message
bugproxy (bugproxy) wrote : SOS report for systemd PCI Roce Interface renaming

Default Comment by Bridge

tags: added: architecture-s39064 bugnameltc-143721 severity-high targetmilestone-inin1604
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → systemd (Ubuntu)
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2016-07-28 12:47 EDT-------
Pinging for status update.

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
Changed in systemd (Ubuntu):
assignee: Skipper Bug Screeners (skipper-screen-team) → nobody
Changed in ubuntu-z-systems:
assignee: Skipper Bug Screeners (skipper-screen-team) → nobody
assignee: nobody → Canonical Server Team (canonical-server)
Changed in systemd (Ubuntu):
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
Revision history for this message
Ryan Harper (raharper) wrote : Re: [Bug 1602737] [NEW] PCI RoCE Interface could not be renamed from default name with link file
Download full text (9.3 KiB)

From what I understand, systemd does not rename devices a second time:

https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1579130

So, it's possible that existing udev rules have already applied to the
device in question and your .link file is "too late".

This maybe a dupe of that; but provide fodder to bump priority to figure
out a solution.

On Thu, Jul 28, 2016 at 3:23 PM, Launchpad Bug Tracker <
<email address hidden>> wrote:

> Frank Heimes (frank-heimes) has assigned this bug to you for systemd in
> Ubuntu:
>
> == Comment: #0 - Helmut Grauer <email address hidden> - 2016-07-13
> 09:05:27 ==
> Try to rename PCI Roce Interface with .link file
>
> root@s35lp02:/etc/systemd/network# cat 10-net.link
> [Match]
> Path=pci-0000:00:00.0*
> MACAddress=82:01:14:07:85:70
>
> [Link]
> Name=hug0
> root@s35lp02:/etc/systemd/network#
>
> do a reboot and journalctl show old interface name for RoCE PCI
> Interface
>
> Jul 13 14:39:40 s35lp02 kernel: mlx4_en 0001:00:00.0: Activating port:1
> Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 1: Using 32 TX
> rings
> Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 1: Using 4 RX
> rings
> Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 1: frag:0 -
> size:1522 prefix:0 stride:1536
> Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 1:
> Initializing port
> Jul 13 14:39:40 s35lp02 kernel: mlx4_en 0001:00:00.0: Activating port:2
> Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 2: Using 32 TX
> rings
> Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 2: Using 4 RX
> rings
> Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 2: frag:0 -
> size:1522 prefix:0 stride:1536
> Jul 13 14:39:40 s35lp02 kernel: mlx4_en: 0001:00:00.0: Port 2:
> Initializing port
> Jul 13 14:39:40 s35lp02 kernel: mlx4_core 0000:00:00.0 enp0s0: renamed
> from eth0
> Jul 13 14:39:40 s35lp02 kernel: mlx4_core 0000:00:00.0 enp0s0d1: renamed
> from eth1
> Jul 13 14:39:40 s35lp02 kernel: mlx4_core 0001:00:00.0 enP1p0s0d1: renamed
> from eth3
> Jul 13 14:39:40 s35lp02 kernel: mlx4_core 0001:00:00.0 enP1p0s0: renamed
> from eth2
> Jul 13 14:39:40 s35lp02 kernel: EXT4-fs (dasda1): mounting ext3 file
> system using the ext4 subsystem
> Jul 13 14:39:40 s35lp02 kernel: EXT4-fs (dasda1): mounted filesystem with
> ordered data mode. Opts: (null)
>
> udevadm test show the following output
>
> oot@s35lp02:/etc/systemd/network# udevadm test /class/net/enp0s0
> calling: test
> version 229
> This program is for debugging only, it does not run any program
> specified by a RUN key. It may show incorrect results, because
> some values may be different, or not available at a simulation run.
>
> === trie on-disk ===
> tool version: 229
> file size: 6841701 bytes
> header size 80 bytes
> strings 1755245 bytes
> nodes 5086376 bytes
> Load module index
> timestamp of '/etc/systemd/network' changed
> Skipping overridden file: /usr/lib/systemd/network/99-default.link.
> Skipping overridden file: /usr/lib/systemd/network/10-net.link.
> Skipping overridden file: /lib/systemd/network/99-default.link.
> Skipping overridden f...

Read more...

Revision history for this message
bugproxy (bugproxy) wrote : SOS report for systemd PCI Roce Interface renaming

Default Comment by Bridge

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2016-08-03 10:22 EDT-------
Helmut Grauer 2016-08-03 07:57:33 EDT :
===
Hi
this installation was not running in a container i.e LXD. The installation was done native on a LPAR .
I tried as well to add a statement for PCI device in /etc/udev/rules.d/70-persistent-net.rules this is also not possible to rename the interface.
For a customer point of use it is sometime important to change the default interface name to a self defined one.
Helmut

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2016-09-08 11:53 EDT-------
Hello Canonical.

May we please have a status update on this bug?

Thanks.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2016-09-13 10:13 EDT-------
Updated to kernel 4.7.0-040700-generic. With the appropriate entry in /etc/udev/rules.d/70-persistent-net.rules, the PCI device shows uip renamed.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Quickly clarified - that was running on Xenial + kernel mainline ppa.

That means it is nothing in e.g. udev in userspace.

Barbara will try to test 4.5, 4.6 quickly as well.
Only if also 4.5 mainline is good too she will test 4.4 from mainline as well (to check if a diff to the xenial 4.4 is causing the issue).

Then I expect it is up to recreating and bisecting on our side?

Revision history for this message
bugproxy (bugproxy) wrote :

Installed and tested
linux-image-4.6.7-040607-generic_4.6.7-040607.201608160432_s390x.deb
(kernel mainline ppa) on my xenial system, did not rename the PCI device.
With
linux-image-4.7.0-040700-generic_4.7.0-040700.201608021801_s390x.deb
the renaming worked fine.

Revision history for this message
bugproxy (bugproxy) wrote : SOS report for systemd PCI Roce Interface renaming

Default Comment by Bridge

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: New → Triaged
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Adding Linux as it seems (at least) to be related to the kernel and might need a bisect followed by a SRU for Xenial.
Also once 4.6 is ready this should be verified and closed on Yakkety.

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2016-09-15 08:54 EDT-------

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

v4.8 is in yakkety-proposed, currently under validation.

Please retest with yakkety-proposed, or can this bug task be set as fix committed for yakkety series?

Changed in linux (Ubuntu Yakkety):
status: New → In Progress
Revision history for this message
Tim Gardner (timg-tpi) wrote :

linux 4.8.0-11.12

Changed in linux (Ubuntu Yakkety):
status: In Progress → Fix Released
Revision history for this message
Frank Heimes (fheimes) wrote :

Just in case - I was able to do proper renaming of RoCE devices with the help of udev on Xenial and Yakkety, with:
$ uname -r
4.4.0-38-generic
and:
$ uname -r
4.8.0-14-generic

Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Xenial):
status: New → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Triaged → In Progress
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: In Progress → Fix Committed
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2016-10-11 06:20 EDT-------
Hi,
retest done with Kernel 4.4.0-38-generic
apt-get install linux-image-extra-4.4.0-38-generic

Linux s35lp02 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:47:15 UTC 2016 s390x s390x s390x GNU/Linux

Renaming of PCI devices with

root@s35lp02:/etc/udev/rules.d# cat 70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="mlx4_core", ATTR{dev_id}=="0x0", KERNELS=="0000:00:00.0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

works fine
root@s35lp02:/etc/udev/rules.d# cat /etc/network/interfaces

allow-hotplug eth0
iface eth0 inet static
address 10.100.60.18
netmask 255.255.0.0

toot@s35lp02:/etc/udev/rules.d# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 82:01:14:07:85:70
inet addr:10.100.60.18 Bcast:10.100.255.255 Mask:255.255.0.0
inet6 addr: fe80::8001:14ff:fe07:8570/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:742 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:66596 (66.5 KB) TX bytes:964 (964.0 B)

Renaming works OK
Greetings Helmut

Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Fix Committed → Fix Released
tags: added: roce
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

ticket closed.

Changed in systemd (Ubuntu):
status: New → Invalid
Changed in systemd (Ubuntu Xenial):
status: New → Invalid
Changed in systemd (Ubuntu Yakkety):
status: New → Invalid
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.