Bug 1364275

Summary: Unable to set up mtu on bonded interface in RHEL 7.2
Product: Red Hat Enterprise Linux 7 Reporter: Saul Serna <sserna>
Component: NetworkManagerAssignee: Rashid Khan <rkhan>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.2CC: atragler, bgalvani, lrintel, rkhan, thaller, vbenes
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: NetworkManager-1.4.0-0.2.git20160621.072358da.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 19:27:58 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:

Description Saul Serna 2016-08-04 22:29:55 UTC
ISSUE:
======
- Unable to set MTU on bond device.
- Already running newer NetworkManager release below based on:

  https://access.redhat.com/solutions/1309583

RUNNING:       NetworkManager-1.0.6-30.el7_2.x86_64
RECOMMENDED:   NetworkManager-1.0.6-27.el7 or later

- Adjusting the MTU manually appears to work:

[root@newanaly ~]# ip link set dev bond0 mtu 9000
[root@newanaly ~]# ip link set dev vlan53 mtu 9000



REPRODUCTION/TESTING:
=====================
Seems this is a bug.

I only could set the MTU if I add a "BOOTPROTO=dhcp" on ifcfg-bond0.

# grep "MTU\|BOOTPROTO" /etc/sysconfig/network-scripts/ifcfg-bond*
/etc/sysconfig/network-scripts/ifcfg-bond0:MTU="9000"
/etc/sysconfig/network-scripts/ifcfg-bond-slave-eth0:MTU="9000"
/etc/sysconfig/network-scripts/ifcfg-bond-slave-eth1:MTU="9000"

# for dev in eth0 eth1 bond0; do ip l show dev $dev; done
2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT qlen 1000
    link/ether 00:16:3e:31:c5:0f brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT qlen 1000
    link/ether 00:16:3e:31:c5:0f brd ff:ff:ff:ff:ff:ff
7: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT 
    link/ether 00:16:3e:31:c5:0f brd ff:ff:ff:ff:ff:ff

# echo "BOOTPROTO=dhcp" >> /etc/sysconfig/network-scripts/ifcfg-bond0

# reboot

# for dev in eth0 eth1 bond0; do ip l show dev $dev; done
2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast master bond0 state UP mode DEFAULT qlen 1000
    link/ether 00:16:3e:31:c5:0f brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast master bond0 state UP mode DEFAULT qlen 1000
    link/ether 00:16:3e:31:c5:0f brd ff:ff:ff:ff:ff:ff
7: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT 
    link/ether 00:16:3e:31:c5:0f brd ff:ff:ff:ff:ff:ff

# grep "MTU\|BOOTPROTO" /etc/sysconfig/network-scripts/ifcfg-bond*
/etc/sysconfig/network-scripts/ifcfg-bond0:MTU="9000"
/etc/sysconfig/network-scripts/ifcfg-bond0:BOOTPROTO=dhcp
/etc/sysconfig/network-scripts/ifcfg-bond-slave-eth0:MTU="9000"
/etc/sysconfig/network-scripts/ifcfg-bond-slave-eth1:MTU="9000"

And the "BOOTPROTO" must be "dhcp" or "static".

--- As 'dhcp':

# sed -i "s/^BOOTPROTO=.*$/BOOTPROTO=none/g" /etc/sysconfig/network-scripts/ifcfg-bond0

# grep "MTU\|BOOTPROTO" /etc/sysconfig/network-scripts/ifcfg-bond*
/etc/sysconfig/network-scripts/ifcfg-bond0:MTU="9000"
/etc/sysconfig/network-scripts/ifcfg-bond0:BOOTPROTO=none
/etc/sysconfig/network-scripts/ifcfg-bond-slave-eth0:MTU="9000"
/etc/sysconfig/network-scripts/ifcfg-bond-slave-eth1:MTU="9000"

# reboot

# for dev in eth0 eth1 bond0; do ip l show dev $dev; done
2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT qlen 1000
    link/ether 00:16:3e:1a:bb:9f brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT qlen 1000
    link/ether 00:16:3e:1a:bb:9f brd ff:ff:ff:ff:ff:ff
7: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT 
    link/ether 00:16:3e:1a:bb:9f brd ff:ff:ff:ff:ff:ff

--- As 'static' is not necessary set a IP address. The MTU of the bond0 is configured as 9000, but the devices eth0 and eth1 are not configured.

# sed -i "s/^BOOTPROTO=.*$/BOOTPROTO=static/g" /etc/sysconfig/network-scripts/ifcfg-bond0

# reboot

# grep "MTU\|BOOTPROTO" /etc/sysconfig/network-scripts/ifcfg-bond*
/etc/sysconfig/network-scripts/ifcfg-bond0:MTU="9000"
/etc/sysconfig/network-scripts/ifcfg-bond0:BOOTPROTO=static
/etc/sysconfig/network-scripts/ifcfg-bond-slave-eth0:MTU="9000"
/etc/sysconfig/network-scripts/ifcfg-bond-slave-eth1:MTU="9000"

# for dev in eth0 eth1 bond0; do ip l show dev $dev; done
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 00:16:3e:1a:bb:9f brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 00:16:3e:31:c5:0f brd ff:ff:ff:ff:ff:ff
7: bond0: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 9000 qdisc noqueue state DOWN mode DEFAULT 
    link/ether 9e:c8:27:9d:f2:3e brd ff:ff:ff:ff:ff:ff

Comment 2 Beniamino Galvani 2016-08-05 07:37:44 UTC
Tried on RHEL 7.3, NetworkManager-1.4.0-0.4.git20160727.9446481f.el7,
the bond and vlan interfaces get the correct MTU:

6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT qlen 1000
    link/ether 52:54:00:a4:80:fb brd ff:ff:ff:ff:ff:ff
7: vlan53@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT qlen 1000
    link/ether 52:54:00:a4:80:fb brd ff:ff:ff:ff:ff:ff

The issue was fixed by commit [1] for bug 1303968, which is quite
similar to this. But probably it's wise not to close this as duplicate
so the different scenario (bond + vlan) gets tested by QE as well.

[1] https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=53dfaddda2adad15f4fbf35780bc03503cc45a63

Comment 4 Vladimir Benes 2016-08-26 20:16:04 UTC
mtu can be set correctly to bridged bond

Comment 6 errata-xmlrpc 2016-11-03 19:27:58 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://rhn.redhat.com/errata/RHSA-2016-2581.html