Bug 1434555
Summary: | Better handling of bonds with TYPE=Ethernet | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Dan Williams <dcbw> | ||||||
Component: | NetworkManager | Assignee: | Beniamino Galvani <bgalvani> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Desktop QE <desktop-qa-list> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 7.4 | CC: | aloughla, atragler, bgalvani, fgiudici, jeder, lrintel, rkhan, sukulkar, thaller, vbenes | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | aos-scalability-35 | ||||||||
Fixed In Version: | NetworkManager-1.8.0-0.4.rc2.el7 | Doc Type: | If docs needed, set a value | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2017-08-01 09:24:38 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: |
|
Description
Dan Williams
2017-03-21 17:47:43 UTC
For the record, /etc/sysconfig/network-scripts/ifcfg-bond0 was: DEVICE=bond0 NM_CONTROLLED=yes TYPE=Ethernet BONDING_OPTS="miimon=100 mode=4 lacp_rate=1" BONDING_MASTER=yes ONBOOT=yes BOOTPROTO=none USERCTL=no Created attachment 1265836 [details]
[PATCH] ifcfg-rh: also check BONDING_OPTS to determine the connection type
(In reply to Beniamino Galvani from comment #3) > Created attachment 1265836 [details] > [PATCH] ifcfg-rh: also check BONDING_OPTS to determine the connection type + && svGetValueStr_cp (parsed, "BONDING_OPTS") the "_cp" stands for copy. The patch leaks a string. rest lgtm It seems the steps from comment 1 only work because 1) the device is called bond0 2a) because the bonding module gets actually loaded and doesn't have max_bonds=0 2b) or, for some other reason a bond with name bond0 already exists. So, initscripts look at the current situation of interfaces and determines that this is a bond. I really wish that the settings plugin would make decisions based on the ifcfg-rh file alone, not looking at the system.... but that is already violated at other places and contradicts initscripts. Anyway, checking for BONDING_OPTS seems like a safe bet still. So +1. Created attachment 1265855 [details] [PATCH v2] ifcfg-rh: also check BONDING_OPTS to determine the connection type (In reply to Thomas Haller from comment #4) > the "_cp" stands for copy. The patch leaks a string. Whoops, fixed in v2. (In reply to Thomas Haller from comment #5) > It seems the steps from comment 1 only work because > 1) the device is called bond0 > 2a) because the bonding module gets actually loaded and doesn't have > max_bonds=0 > 2b) or, for some other reason a bond with name bond0 already exists. > > So, initscripts look at the current situation of interfaces and determines > that this is a bond. I really wish that the settings plugin would make > decisions based on the ifcfg-rh file alone, not looking at the system.... > but that is already violated at other places and contradicts initscripts. The configuration file in comment 0 works for every device name and not only for bond0, because install_bonding_drivers(), which is called when BONDING_OPTS is set, also creates the bond interface through sysfs: [ -n "$BONDING_OPTS" ] && install_bonding_driver $1 -- install_bonding_driver () { [ ! -f /sys/class/net/bonding_masters ] && ( modprobe bonding || return 1 ) if ! fgrep -sqx "$1" /sys/class/net/bonding_masters; then echo "+$1" > /sys/class/net/bonding_masters 2>/dev/null ... So, it doesn't depend on system status. Fixed in master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=e044071825f2b166a2a7dc16bb2d62b6c68d867a nm-1-8: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?h=nm-1-8&id=12cc8d729d318bc2a84f05510d11a21c13bdb73f 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/RHSA-2017:2299 |