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.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Slave/NetConfigDevice.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py
index 11f39d5..3816e0a 100644
--- a/lnst/Slave/NetConfigDevice.py
+++ b/lnst/Slave/NetConfigDevice.py
@@ -107,6 +107,10 @@ 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
+ exec_cmd('ip link set %s down' % self._dev_config["name"])
+
for option, value in options:
if option == "primary":
'''
--
1.9.3
Show replies by date