Univention Bugzilla – Bug 36341
bond-primary is never written to UCR
Last modified: 2014-12-03 14:49:27 CET
2014102821000257 The selected primary interface in the bonding wizard is never written into UCR. This is problematic in scenarios where one of the network paths is prefered (faster for example). In case of failure, the bond switches to the (slower) fallback interface/path but never switches back to the prefered (primary) interface/path when that one is back up. Workaround: Configure manually via UCR: ucr set interfaces/bond1/options/X="bond-primary ethN" Don't know if that gets overridden when re-running the UMC wizard. Manuel switch to the prefered interface is also possible at runtime via ifenslave, e.g.: # ifenslave -c bond0 eth0
"1" != 1 in the requests to http:///umcp/command/setup/validate and http:///umcp/command/setup/save: { "options" : { "values" : { "interfaces" : { "bond0" : { ... "bond_mode" : "1", }, "eth1" : {...}, "eth0" : {...} } } } } diff --git a/branches/ucs-3.2/ucs-3.2-3/base/univention-system-setup/umc/python/setup/network.py b/branches/ucs-3.2/ucs-3.2-3/base/univention-system-setup/umc/python/setup/network.py index ce6039f..4d945e6 100644 --- a/branches/ucs-3.2/ucs-3.2-3/base/univention-system-setup/umc/python/setup/network.py +++ b/branches/ucs-3.2/ucs-3.2-3/base/univention-system-setup/umc/python/setup/network.py @@ -744,7 +741,7 @@ class Bond(Device): 'bond-slaves %s' % (' '.join(self.bond_slaves),), 'bond-mode %s' % (self.bond_mode,), ] - if self.bond_mode == 1 and self.bond_primary: + if self.bond_mode in (1, '1') and self.bond_primary: options.append('bond-primary %s' % (' '.join(self.bond_primary),)) if self.miimon is not None: options.append('bond-miimon %s' % (self.miimon,))
Created attachment 6264 [details] Fix bond-primary UCR variable
Set up from bond-mode 2 to bond-mode 1 saves also the bond-primary: 7,8c7,9 < interfaces/bond0/options/1: bond-mode 2 < interfaces/bond0/options/2: bond-slaves eth0 eth1 --- > interfaces/bond0/options/1: bond-mode 1 > interfaces/bond0/options/2: bond-primary eth1 > interfaces/bond0/options/3: bond-slaves eth0 eth1 YAML: 2014-11-21-univention-system-setup.yaml
OK: r56048 OK: aptitude install '?source-package(univention-system-setup)?installed' OK: cat /etc/network/interfaces OK: cat /sys/class/net/bond0/bonding/primary OK: 2014-11-21-univention-system-setup.yaml FIXED: announce_errata.pmh -V 2014-11-21-univention-system-setup.yaml wrap, "MII monitoring", German -> r56267
http://errata.univention.de/ucs/3.2/246.html