Bug 1928745
| Summary: | copy-mac-from should use perm_hwaddr | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Mingyu Shi <mshi> | ||||
| Component: | nmstate | Assignee: | Gris Ge <fge> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Mingyu Shi <mshi> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 8.4 | CC: | ferferna, jiji, jishi, network-qe, till | ||||
| Target Milestone: | rc | Keywords: | Triaged | ||||
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | No Doc Update | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2021-11-09 17:42:57 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
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 Created attachment 1792312 [details]
issue.log
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]
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 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. 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. Pre-test could be done by using `sudo dnf copr enable packit/nmstate-nmstate-1651` 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 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 |
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: