Enhancement #3299

Default bonding mode to active-backup

Added by Filippo Carletti almost 6 years ago. Updated over 5 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-base
Target version:v6.7
Resolution: NEEDINFO:No

Description

I think that the default mode for bonded ethernets should be 1 (active-backup), because it works well without the need of "special" switches and/or wrong cabling.
The linux kernel default is 0 (round-robin).
An expert sysadmin can follow documentation to change mode.
Some documentation:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-networkscripts-interfaces-chan.html
https://www.kernel.org/doc/Documentation/networking/bonding.txt


Related issues

Related to NethServer 6 - Enhancement #3373: Bond miimon default value CLOSED

Associated revisions

Revision fba5a692
Added by Davide Principi over 5 years ago

Accumulate BondOpt props and emit BONDING_OPTS. Refs #3299

Revision 873b7501
Added by Davide Principi over 5 years ago

NetworkAdapter UI: added BondMode selector. Refs #3299

Revision 895ca62d
Added by Davide Principi over 5 years ago

Accumulate BondOpt props and emit BONDING_OPTS. Refs #3299

Revision b3f8b0ae
Added by Davide Principi over 5 years ago

NetworkAdapter UI: added BondMode selector. Refs #3299

History

#1 Updated by Filippo Carletti almost 6 years ago

  • Category set to nethserver-base
  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20

Here's a command to set mode:

db networks setprop bond0 bonding_opts '"miimon=100 mode=1"'

Pay attention to the quotes (single, then double).

#2 Updated by Filippo Carletti almost 6 years ago

After a signal-event interface-update the ifcfg-bond0 config file should contain:

BONDING_OPTS="miimon=100 mode 1" 

#3 Updated by Davide Principi over 5 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Davide Principi
  • Target version changed from ~FUTURE to v6.7
  • % Done changed from 20 to 30

#4 Updated by Davide Principi over 5 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 30 to 60

MODIFIED

  • The "New Logical Interface" UI allows selecting the bond mode
  • The bond mode proposed by UI is "active-backup"
  • The underlying implementation creates BONDING_OPTS value by reading any prop named after "BondOpt" prefix

Test case 1

After upgrading to the modified package signal interface-update event. Existing bond configuration must not change. To check the bond configuration (for instance):

cat /proc/net/bonding/bond* | grep Mode

Test case 2

  • Create a new bond interface
  • Check the applied mode reflects the UI choice

#5 Updated by Davide Principi over 5 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

In nethserver-testing:
nethserver-base-2.9.7-1.3.g873b750.ns6.noarch.rpm

TODO (on verified):

  • update inline help
  • update admin's manual

#6 Updated by Giacomo Sanchietti over 5 years ago

  • Assignee set to Giacomo Sanchietti

#7 Updated by Giacomo Sanchietti over 5 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 70 to 90
Created 2 bond interfaces:
  • bond0 set as active-backup
  • bond1 set as round-robin
[root@ns1 ~]# grep Mode /proc/net/bonding/bond1 
Bonding Mode: load balancing (round-robin)
[root@ns1 ~]# grep Mode /proc/net/bonding/bond0 
Bonding Mode: fault-tolerance (active-backup)

[root@ns1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond1
DEVICE=bond1
BOOTPROTO=none
GATEWAY=192.168.1.253
IPADDR=192.168.1.246
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Bond
USERCTL=no

[root@ns1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0 
DEVICE=bond0
BOOTPROTO=none
GATEWAY=192.168.2.253
IPADDR=192.168.2.246
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Bond
USERCTL=no
BONDING_OPTS="mode=1" 

It works as expected.

Note
If you need to change the mode of an existing bond:

db networks setprop bond0 BondOptMode 2
signal-event interface-update
reboot

#8 Updated by Davide Principi over 5 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100

#9 Updated by Davide Principi over 5 years ago

Also available in: Atom PDF