RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1392426 - Add support to generate network interface name from phys_port_name
Summary: Add support to generate network interface name from phys_port_name
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: pre-dev-freeze
: ---
Assignee: systemd-maint
QA Contact: Branislav Blaškovič
URL: https://github.com/systemd/systemd/co...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-07 13:30 UTC by Ivan Vecera
Modified: 2017-09-20 12:10 UTC (History)
7 users (show)

Fixed In Version: systemd-219-31.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1425737 (view as bug list)
Environment:
Last Closed: 2017-08-01 09:12:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2297 0 normal SHIPPED_LIVE systemd bug fix and enhancement update 2017-08-01 12:40:16 UTC

Description Ivan Vecera 2016-11-07 13:30:04 UTC
Switch drivers uses phys_port_name attribute to pass front panel port name to user. Use it to generate netdev names.

Upstream implementation:
https://github.com/systemd/systemd/commit/4887b656c22af059d4e833de7b56544f24951184

Comment 1 Lukáš Nykrýn 2016-11-07 13:50:34 UTC
What about existing installation, wouldn't this change the names of devices for those systems?

Comment 2 Ivan Vecera 2016-11-07 14:48:21 UTC
No, phys_port_name attribute is reported only by switchdev drivers (mlxsw & rocker) that are not supported yet and will be supported in RHEL7.4. So there are no existing installations.

Comment 3 Lukáš Nykrýn 2016-11-07 15:15:16 UTC
Ok great, than in that case devel_ack+

Comment 4 Lukáš Nykrýn 2017-01-19 09:42:19 UTC
https://github.com/lnykryn/systemd-rhel/pull/80

Comment 5 Ivan Vecera 2017-01-19 13:06:06 UTC
Thanks Lukas... I have tested your backport and everything works fine.

Comment 6 Branislav Blaškovič 2017-02-06 13:41:55 UTC
qa_ack+ for 7.4

Comment 7 Lukáš Nykrýn 2017-02-06 15:31:45 UTC
fix merged to upstream staging branch ->
https://github.com/lnykryn/systemd-rhel/commit/192545bc67fed763ac54761ca067b9c2f93ecdd1
-> post

Comment 11 errata-xmlrpc 2017-08-01 09:12:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2297

Comment 12 LiLiang 2017-09-19 05:52:56 UTC
Hi Ivan,

#cat /etc/udev/rules.d/10-local.rules 
SUBSYSTEM=="net", ACTION=="add", ATTR{phys_switch_id}=="7cfe90ff2cc0", \
	ATTR{phys_port_name}!="", NAME="sw1$attr{phys_port_name}"

this bug means i can use phys_port_name in udev rules now?

if this bug is not resolved, i can't use phys_port_name in udev rules ?

I just want to confirm this for writing case. thanks.

Comment 13 Ivan Vecera 2017-09-19 12:24:40 UTC
(In reply to LiLiang from comment #12)
> Hi Ivan,
> 
> #cat /etc/udev/rules.d/10-local.rules 
> SUBSYSTEM=="net", ACTION=="add", ATTR{phys_switch_id}=="7cfe90ff2cc0", \
> 	ATTR{phys_port_name}!="", NAME="sw1$attr{phys_port_name}"
> 
> this bug means i can use phys_port_name in udev rules now?
Yes, but you don't need such rule. With this BZ resolved udev will use phys_port_name by default.

> if this bug is not resolved, i can't use phys_port_name in udev rules ?
No, if this bug is not resolved then udev won't use phys_port_name by default but if you have local rule like the above one then it will work.

Comment 14 LiLiang 2017-09-20 01:37:51 UTC
(In reply to Ivan Vecera from comment #13)
> (In reply to LiLiang from comment #12)
> > Hi Ivan,
> > 
> > #cat /etc/udev/rules.d/10-local.rules 
> > SUBSYSTEM=="net", ACTION=="add", ATTR{phys_switch_id}=="7cfe90ff2cc0", \
> > 	ATTR{phys_port_name}!="", NAME="sw1$attr{phys_port_name}"
> > 
> > this bug means i can use phys_port_name in udev rules now?
> Yes, but you don't need such rule. With this BZ resolved udev will use
> phys_port_name by default.
> 
> > if this bug is not resolved, i can't use phys_port_name in udev rules ?
> No, if this bug is not resolved then udev won't use phys_port_name by
> default but if you have local rule like the above one then it will work.

Thanks a lot:)

Comment 15 LiLiang 2017-09-20 03:21:50 UTC
Hi Ivan,

Where is the default udev rule ? I can't find it in "/etc/udev/rules.d/" .

Do you think i need to write a test case to verify "the default interface name conform to the default rule" ?

Comment 16 Ivan Vecera 2017-09-20 12:10:11 UTC
(In reply to LiLiang from comment #15)
> Hi Ivan,
> 
> Where is the default udev rule ? I can't find it in "/etc/udev/rules.d/" .
/usr/lib/udev/rules.d/

> Do you think i need to write a test case to verify "the default interface
> name conform to the default rule" ?
I don't think so.


Note You need to log in before you can comment on or make changes to this bug.