From f96f8080284948b7d813ad1990a645fad504174f Mon Sep 17 00:00:00 2001 From: Dan Sneddon Date: Tue, 9 Aug 2016 11:52:06 -0700 Subject: Fix Linux bond/slave ifup ordering The latest version of os-net-config is not reliably enabling bonding when there are no existing bonds on the system. This is due to an order-of-operations problem where it tries to bring up the bond before the slave interfaces. This can result in an error because the bonding module is not present. This change activates the bond only after the interfaces have been activated. This should ensure that the bonding module is loaded. Change-Id: I62e4b10a88168948ed59170285223fb4f8d8de88 Fixes-bug: 1611471 --- os_net_config/impl_ifcfg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/os_net_config/impl_ifcfg.py b/os_net_config/impl_ifcfg.py index 49ad317..ea17246 100644 --- a/os_net_config/impl_ifcfg.py +++ b/os_net_config/impl_ifcfg.py @@ -699,9 +699,6 @@ class IfcfgNetConfig(os_net_config.NetConfig): self.write_config(location, data) if activate: - for linux_bond in restart_linux_bonds: - self.ifup(linux_bond) - for linux_team in restart_linux_teams: self.ifup(linux_team) @@ -711,6 +708,9 @@ class IfcfgNetConfig(os_net_config.NetConfig): for interface in restart_interfaces: self.ifup(interface) + for linux_bond in restart_linux_bonds: + self.ifup(linux_bond) + for bond in self.bond_primary_ifaces: self.ovs_appctl('bond/set-active-slave', bond, self.bond_primary_ifaces[bond]) -- cgit 1.2.3-korg