From: Ondrej Lichtner <olichtne(a)redhat.com>
When NM is running on a machine and lnst is using normal configuration
the bond is created, NM sets it up which makes the configuration of the
bonding mode fail. This patch makes sure that before configuring any
options the device is down. It's a temporary workaround until the issue
is fixed in NM.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Slave/NetConfigDevice.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py
index 11f39d5..bdcab5a 100644
--- a/lnst/Slave/NetConfigDevice.py
+++ b/lnst/Slave/NetConfigDevice.py
@@ -107,6 +107,13 @@ class NetConfigDeviceBond(NetConfigDeviceGeneric):
if not "options" in self._dev_config:
return
options = self._dev_config["options"]
+
+ #Make sure that the device is down before configuring options
+ #this is a temporary workaround for NM setting the device IFF_UP on
+ #creation, which means that there is still a race condition here.
+ #Related to RH bgz #1114685
+ exec_cmd('ip link set %s down' % self._dev_config["name"])
+
for option, value in options:
if option == "primary":
'''
--
1.9.3