Red Hat Bugzilla – Bug 1303968
NetworkManager Bridged Team MTU Fails to Set
Last modified: 2017-01-12 18:49:48 EST
Created attachment 1120463 [details] /var/log/messages Note: I'm not sure if it matters, but this server was upgraded from 7.0-1406 to the current release (as of today). As well, this seems to be similar in nature to https://bugzilla.redhat.com/show_bug.cgi?id=1275035 Description of problem: Setting the MTU on a bridged team has no effect on the actual MTU. While the configuration does show that the MTU should be 9000, both 'ip' and 'ifconfig' show the links as being set for 1500. MTU gets set fine without a bridge. Version-Release number of selected component (if applicable): [root@kvm01-centos7 ~]# NetworkManager -V 1.0.6-27.el7 How reproducible: Always Steps to Reproduce: 1. Create and configure a bridge: nmcli c add type bridge con-name br0 ifname br0 nmcli c modify br0 connection.zone internal 802-3-ethernet.mtu 9000 ipv4.method manual ipv4.dns '10.0.80.11 10.0.80.12' ipv4.addresses '10.120.19.87/26' ipv4.gateway '10.120.19.65' ipv4.routes '10.0.0.0/8 10.120.19.65 0' ipv6.method ignore 2. Create and configure a team: nmcli c add type team con-name team0 ifname team0 nmcli c modify team0 connection.zone internal 802-3-ethernet.mtu 9000 team.config team0.cfg connection.slave-type bridge connection.master br0 3. Create and configure 2 slaves: nmcli c add type team-slave con-name team0-slave0 ifname ens18f0 master team0 nmcli c modify team0-slave0 connection.zone internal 802-3-ethernet.mtu 9000 nmcli c add type team-slave con-name team0-slave1 ifname enp3s0f0 master team0 nmcli c modify team0-slave1 connection.zone internal 802-3-ethernet.mtu 9000 4. Re-initialize all the things: nmcli c up br0 nmcli c up team0 nmcli c up team0-slave0 nmcli c up team0-slave1 5. Test your connection: ping -c4 10.0.80.11 6. View the MTU: ip link Actual results: MTU not set to 9000 Expected results: MTU set to 9000 MTU set to 9000 Additional info: Here's what it looked like: [root@kvm01-centos7 ~]# nmcli c add type bridge con-name br0 ifname br0 Connection 'br0' (b78cf8ed-0e6b-43b0-bd6a-31cf507fddc5) successfully added. [root@kvm01-centos7 ~]# nmcli c modify br0 connection.zone internal 802-3-ethernet.mtu 9000 ipv4.method manual ipv4.dns '10.0.80 .11 10.0.80.12' ipv4.addresses '10.120.19.87/26' ipv4.gateway '10.120.19.65' ipv4.routes '10.0.0.0/8 10.120.19.65 0' ipv6.method ignore [root@kvm01-centos7 ~]# nmcli c add type team con-name team0 ifname team0 Connection 'team0' (72c585d1-98df-4799-9115-ecf259e65729) successfully added. [root@kvm01-centos7 ~]# nmcli c modify team0 connection.zone internal 802-3-ethernet.mtu 9000 team.config team0.cfg connection.s lave-type bridge connection.master br0 [root@kvm01-centos7 ~]# nmcli c add type team-slave con-name team0-slave0 ifname ens18f0 master team0 Connection 'team0-slave0' (10c5c615-f4d8-43f8-a1f3-1ea23bc58133) successfully added. [root@kvm01-centos7 ~]# nmcli c modify team0-slave0 connection.zone internal 802-3-ethernet.mtu 9000 [root@kvm01-centos7 ~]# nmcli c add type team-slave con-name team0-slave1 ifname enp3s0f0 master team0 Connection 'team0-slave1' (a4096eaa-4a21-4f12-8b5d-340c7693366f) successfully added. [root@kvm01-centos7 ~]# nmcli c modify team0-slave1 connection.zone internal 802-3-ethernet.mtu 9000 [root@kvm01-centos7 ~]# nmcli c up br0 Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnecti on/27) [root@kvm01-centos7 ~]# nmcli c up team0 Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnecti on/28) [root@kvm01-centos7 ~]# nmcli c up team0-slave0 Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/31) [root@kvm01-centos7 ~]# nmcli c up team0-slave1 Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/32) [root@kvm01-centos7 ~]# ping -c4 10.0.80.11 PING 10.0.80.11 (10.0.80.11) 56(84) bytes of data. 64 bytes from 10.0.80.11: icmp_seq=1 ttl=253 time=4.96 ms 64 bytes from 10.0.80.11: icmp_seq=2 ttl=253 time=0.113 ms 64 bytes from 10.0.80.11: icmp_seq=3 ttl=253 time=0.113 ms 64 bytes from 10.0.80.11: icmp_seq=4 ttl=253 time=0.122 ms --- 10.0.80.11 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3001ms rtt min/avg/max/mdev = 0.113/1.329/4.969/2.101 ms [root@kvm01-centos7 ~]# ip l 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: ens18f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master team0 state UP mode DEFAULT qlen 1000 link/ether 0c:c4:7a:39:4d:06 brd ff:ff:ff:ff:ff:ff 3: ens18f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master team1 state UP mode DEFAULT qlen 1000 link/ether 0c:c4:7a:39:4d:07 brd ff:ff:ff:ff:ff:ff 4: enp3s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master team0 state UP mode DEFAULT qlen 1000 link/ether 0c:c4:7a:39:4d:06 brd ff:ff:ff:ff:ff:ff 5: enp3s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master team1 state UP mode DEFAULT qlen 1000 link/ether 0c:c4:7a:39:4d:07 brd ff:ff:ff:ff:ff:ff 19: team0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UP mode DEFAULT link/ether 0c:c4:7a:39:4d:06 brd ff:ff:ff:ff:ff:ff 20: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT link/ether 0c:c4:7a:39:4d:06 brd ff:ff:ff:ff:ff:ff 21: team1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br1 state UP mode DEFAULT link/ether 0c:c4:7a:39:4d:07 brd ff:ff:ff:ff:ff:ff 22: br1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT link/ether 0c:c4:7a:39:4d:07 brd ff:ff:ff:ff:ff:ff
Please ignore the terrible formatting of output, I had to copy and paste.
The MTU is not set because the team connection doesn't have any IP configuration and we change the MTU in ip4_config_pre_commit() of nm-device-team.c; probably we should move the change of MTU to another callback that runs also when there is no IP configuration.
Created attachment 1137401 [details] [PATCH] device: apply MTU setting also to devices without IPv4 configuration Patch for master.
*** Bug 1303731 has been marked as a duplicate of this bug. ***
(In reply to Beniamino Galvani from comment #4) > Created attachment 1137401 [details] > [PATCH] device: apply MTU setting also to devices without IPv4 configuration > > Patch for master. +static void +nm_device_apply_mtu_from_config (NMDevice *self) I would name static methods without nm_ prefix (although there are counter examples). + _LOGE (LOGD_DEVICE | LOGD_IP, + "setting MTU of device without IP4 config to %u", _LOGD? Rest lgtm
Created attachment 1138952 [details] [PATCH v2] device: apply MTU setting also to devices without IPv4 configuration (In reply to Thomas Haller from comment #6) > I would name static methods without nm_ prefix (although there are counter > examples). > _LOGD? Both fixed, thanks.
*** Bug 1316590 has been marked as a duplicate of this bug. ***
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
(In reply to Beniamino Galvani from comment #7) > Created attachment 1138952 [details] > [PATCH v2] device: apply MTU setting also to devices without IPv4 > configuration > > (In reply to Thomas Haller from comment #6) > > I would name static methods without nm_ prefix (although there are counter > > examples). > > > _LOGD? > > Both fixed, thanks. LGTM now.
(In reply to Beniamino Galvani from comment #7) > Created attachment 1138952 [details] > [PATCH v2] device: apply MTU setting also to devices without IPv4 > configuration LGTM
Merged to master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=53dfaddda2adad15f4fbf35780bc03503cc45a63
works fine now, mtu 9000 is set from slave over team to bridge
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://rhn.redhat.com/errata/RHSA-2016-2581.html