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 1928745 - copy-mac-from should use perm_hwaddr
Summary: copy-mac-from should use perm_hwaddr
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-15 13:23 UTC by Mingyu Shi
Modified: 2021-11-09 20:16 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 17:42:57 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
issue.log (7.05 KB, text/plain)
2021-06-19 15:09 UTC, Mingyu Shi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github nmstate/nmstate/commit/e87349169dd89eb66469c614a7eb05ccf0606b53 0 None None None 2021-06-07 10:56:29 UTC
Github nmstate nmstate pull 1651 0 None closed bond: Use perm_hwaddr of bond port as fallback for copy_mac_from 2021-06-29 07:39:09 UTC
Red Hat Product Errata RHBA-2021:4157 0 None None None 2021-11-09 17:43:13 UTC

Description Mingyu Shi 2021-02-15 13:23:51 UTC
Description of problem:
In some bond modes, all slaves' mac addresses are changed to an identical one. If another bond interface enslaves and copies from one of these slaves, it will take the running mac, not perm_hwaddr(original mac).

Version-Release number of selected component (if applicable):
nmstate-1.0.2-0.3.el8.noarch
nispor-1.0.1-3.el8.x86_64
NetworkManager-1.30.0-0.10.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
ip link add veth0 type veth peer veth0_ep
ip link add veth1 type veth peer veth1_ep
ip link show veth1 #check the original mac of veth1
echo "interfaces:
- name: bond0
  type: bond
  state: up
  copy-mac-from: veth0
  link-aggregation:
    mode: balance-xor
    port:
    - veth0
    - veth1" | nmstatectl set
sleep 3
echo "interfaces:
- name: bond1
  type: bond
  state: up
  copy-mac-from: veth1
  link-aggregation:
    mode: balance-xor
    port:
    - veth1" | nmstatectl set
nmstatectl show bond*,veth[01]

Actual results:
bond0, bond1, veth0 and veth1 are with same mac address(copy from veth0)

Expected results:
bond1 and veth1 should use original mac address(perm_hwaddr) of veth1

Additional info:

Comment 1 Gris Ge 2021-02-18 03:32:08 UTC
This requires the support of ETHTOOL `ethtool -P|--show-permaddr DEVNAME` by nispor.

Nispor part will be tracked by https://bugzilla.redhat.com/show_bug.cgi?id=1929962

Comment 2 Fernando F. Mancera 2021-06-07 10:56:30 UTC
Upstream patch: https://github.com/nmstate/nmstate/commit/e87349169dd89eb66469c614a7eb05ccf0606b53

Comment 6 Mingyu Shi 2021-06-19 15:09:31 UTC
Created attachment 1792312 [details]
issue.log

Comment 7 Mingyu Shi 2021-06-19 15:16:02 UTC
Hi, when veth1 was moved from bond0 to bond1, bond1 and veth1 were still using mac from veth0, not perm_hwaddr of veth1.
Please check the attachment above.

As interface managed rule changed, here's an update of reproducer, set veth managed:
ip link add veth0 type veth peer veth0_ep
ip link add veth1 type veth peer veth1_ep
nmcli dev set veth0 managed yes
nmcli dev set veth1 managed yes
ip link show veth1 #check the original mac of veth1
echo "interfaces:
- name: bond0
  type: bond
  state: up
  copy-mac-from: veth0
  link-aggregation:
    mode: balance-xor
    port:
    - veth0
    - veth1" | nmstatectl set
sleep 3
echo "interfaces:
- name: bond1
  type: bond
  state: up
  copy-mac-from: veth1
  link-aggregation:
    mode: balance-xor
    port:
    - veth1" | nmstatectl set
nmstatectl show bond*,veth[01]

Comment 8 Mingyu Shi 2021-06-19 15:16:48 UTC
versions:
nmstate-1.1.0-0.3.alpha3.el8.noarch
nispor-1.1.0-2.el8.x86_64
NetworkManager-1.32.0-0.5.el8.x86_64

Comment 11 Gris Ge 2021-06-19 17:18:06 UTC
Hi Mingyu,

The veth does not support permanent mac address, that's the reason your test fails.

Please use real NICs or e1000e in VM.

Comment 12 Gris Ge 2021-06-23 08:33:45 UTC
There are two type permanent MAC address in this bug:
 1. Ethtool permanent MAC address which is retried from NIC driver/firmware.
 2. The bond port `perm_hwaddr` property which holding the original MAC address before this port been assigned to a bond controller.


With posted patch, nmstate will prefer item 1) and use item 2) as fallback.

To test item 1), you need real NIC or e1000e in VM.
To test item 2), veth is good enough.

Comment 13 Gris Ge 2021-06-23 08:34:11 UTC
Pre-test could be done by using `sudo dnf copr enable packit/nmstate-nmstate-1651`

Comment 15 Mingyu Shi 2021-07-13 06:41:20 UTC
Verified with versions:
nmstate-1.1.0-0.6.alpha6.el8.noarch
nispor-1.1.1-1.el8.x86_64
NetworkManager-1.32.2-1.el8.x86_64

Comment 18 errata-xmlrpc 2021-11-09 17:42:57 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 (nmstate bug fix and enhancement update), 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-2021:4157


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