Discussion:
Bug#815819: sysconfig-hardware udev rule ignores INTERFACE_NAME property
(too old to reply)
Raphael Philipe Mendes da Silva
2016-02-24 18:00:01 UTC
Permalink
Package: sysconfig-hardware
Version: 0.0.11
Severity: normal
X-Debbugs-CC: ***@linux.vnet.ibm.com,***@linux.vnet.ibm.com

I wanted to change the network interface name without using a custom
udev rule like 70-persistent-net.rules.
To do that, In Debian 8, I created a network interface hardware config
file (/etc/sysconfig/hardware/config-ccw-0.0.xxxx) with the following
content:

CCWGROUP_CHANS=(0.0.xxxx 0.0.xxxy 0.0.xxxz)
QETH_PORTNAME=OSAPORT
QETH_PORTNO=0
QETH_OPTIONS=(layer2)
INTERFACE_NAME=ethfoo

The interface is created and is up. However the name of the
interface remains enccw0.0.xxxx

I did a little debug and verified that the udev rule in the file /lib/udev/rules.d/65-sysconfig-hardware-net.rules was wrong:
It had:
SUBSYSTEM=="net", IMPORT{program}="/etc/sysconfig/scripts/hardware/udev-net $DEVPATH"
SUBSYSTEM=="net", ENV{INTERFACE_NAME}=="?*", NAME="$env{INTERFACE_NAME}"
But the correct would be:
SUBSYSTEM=="net", IMPORT{program}="/etc/sysconfig/scripts/hardware/udev-net $env{DEVPATH}"
SUBSYSTEM=="net", ENV{INTERFACE_NAME}=="?*", NAME="$env{INTERFACE_NAME}"

I tested the correction locally, and it worked.

I'm sure this problem also affects 0.0.12, since I took a look at the code.
Hendrik Brueckner
2016-02-25 08:10:01 UTC
Permalink
Post by Raphael Philipe Mendes da Silva
Package: sysconfig-hardware
Version: 0.0.11
Severity: normal
I wanted to change the network interface name without using a custom
udev rule like 70-persistent-net.rules.
To do that, In Debian 8, I created a network interface hardware config
file (/etc/sysconfig/hardware/config-ccw-0.0.xxxx) with the following
CCWGROUP_CHANS=(0.0.xxxx 0.0.xxxy 0.0.xxxz)
QETH_PORTNAME=OSAPORT
QETH_PORTNO=0
QETH_OPTIONS=(layer2)
INTERFACE_NAME=ethfoo
The interface is created and is up. However the name of the
interface remains enccw0.0.xxxx
Have you tried to create systemd network link file to assign a different
name? This should be then the long-term way how to rename interface
names. But I agree to correct the behavior in sysconfig-hardware for
correctness.

Thanks and kind regards,
Hendrik
Raphael Philipe Mendes da Silva
2016-02-25 16:40:02 UTC
Permalink
Post by Hendrik Brueckner
Have you tried to create systemd network link file to assign a different
name? This should be then the long-term way how to rename interface
names. But I agree to correct the behavior in sysconfig-hardware for
correctness.
Yes, I'm aware of this method. I just wanted to report this bug in case
someone else touch it.
Post by Hendrik Brueckner
Thanks and kind regards,
Hendrik
Debian Bug Tracking System
2016-02-27 16:20:02 UTC
Permalink
Your message dated Sat, 27 Feb 2016 15:58:55 +0000
with message-id <E1aZhGh-0008Pe-***@franck.debian.org>
and subject line Bug#815819: fixed in sysconfig 0.0.13
has caused the Debian Bug report #815819,
regarding sysconfig-hardware udev rule ignores INTERFACE_NAME property
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ***@bugs.debian.org
immediately.)
--
815819: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815819
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Loading...