Bug 1685166

Summary: Record permanent mac address when device is enslaved in a team, or else /etc/mac-addresses will record broken information
Product: Red Hat Enterprise Linux 7 Reporter: Pavel Cahyna <pcahyna>
Component: rearAssignee: Pavel Cahyna <pcahyna>
Status: CLOSED ERRATA QA Contact: David Jež <djez>
Severity: medium Docs Contact: Marie Hornickova <mdolezel>
Priority: urgent    
Version: 7.6CC: djez, fkrska, jkucera, lkuprova, pasik, pcahyna, rmetrich, thozza
Target Milestone: rcKeywords: Regression, ZStream
Target Release: 7.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
.Teaming in the rescue system works correctly again Updates provided by the advisory RHBA-2019:0498 fixed several problems in ReaR, affecting complex network configurations. However, in case of teaming, this update introduced another problem. If the team had multiple member interfaces, the team device was not configured correctly in the rescue system. As a consequence, after applying an update provided by RHBA-2019:0498, a work around was needed to preserve the previous behavior. This update fixes the bug in ReaR, and teaming in the rescue system now works correctly.
Story Points: ---
Clone Of:
: 1685178 1690518 (view as bug list) Environment:
Last Closed: 2019-08-06 13:12:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1685178, 1690518, 1691304    

Description Pavel Cahyna 2019-03-04 14:17:24 UTC
This bug was initially created as a copy of Bug #1653214

I am copying this bug because: 
the inital bug was for bond, but the same issue exists for team, and is not fixed by the patch.

Description of problem:

See https://github.com/rear/rear/pull/2065 and https://github.com/rear/rear/pull/1954/commits/a8d52b7caef3dd4ec8645f36631f5770427bf6dc#r261993600.

When a physical device is enslaved in a team, its MAC address is modified to the first network interface's MAC address of the team. This makes /etc/mac-addresses record an invalid information, e.g.:

/tmp/rear.7Qce2ppNowoFkvF/rootfs/etc/mac-addresses
Broken:
em3 24:6e:96:c4:3d:d4
em1 24:6e:96:c4:3d:d0
em2 24:6e:96:c4:3d:d0

Expected:
em3 24:6e:96:c4:3d:d4
em1 24:6e:96:c4:3d:d2
em2 24:6e:96:c4:3d:d0

This leads to teamd being invoked with incorrect parameters from /etc/scripts/system-setup.d/60-network-devices.sh:

teamd -d -c '{"device": "int-team", "ports": {"em1": {"link_watch": {"name": "ethtool"}}, "em1": {"link_watch": {"name": "ethtool"}}}, "runner": {"name": "lacp", "tx_hash": ["eth", "ipv4", "ipv6"]}}'
which fails with
Failed to parse config: duplicate object key near '"em1"' on line 1, column 82
Failed to load config.

see https://bugzilla.redhat.com/show_bug.cgi?id=1664304#c3 for details.

(the script is being modified by a sed command which changes the names of interfaces according to /etc/mac-addresses to compensate for missing interface renaming.)

The same issue existed for bonding. While the bonding issue was fixed, the teaming one requires a different fix.

Since SIMPLIFY_TEAMING=no is the default as the result of applying the fix of bz1639705, this leads to a regression, since the configuration which can work with the old code (equivalent to SIMPLIFY_TEAMING=yes) are now broken. (Those configurations can be characterized as: no LACP and teaming with more than one team member.)

The regression can be fixed simply by changing the default to SIMPLIFY_TEAMING=yes, but  for a complete fix one needs to apply PR#2065.

Comment 3 Pavel Cahyna 2019-03-14 09:12:24 UTC
Upstream PR merged

Comment 19 errata-xmlrpc 2019-08-06 13:12:09 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-2019:2273