aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config
diff options
context:
space:
mode:
authorDan Sneddon <dsneddon@redhat.com>2016-08-09 11:52:06 -0700
committerDan Sneddon <dsneddon@redhat.com>2016-08-09 11:52:06 -0700
commitf96f8080284948b7d813ad1990a645fad504174f (patch)
tree80c7628e5d3b5e3af586e7fc0f8e8a0d79f12fa9 /os_net_config
parent311df0c3828fe7571079fad9763bca9e2414b51a (diff)
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
Diffstat (limited to 'os_net_config')
-rw-r--r--os_net_config/impl_ifcfg.py6
1 files 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])