From: Ondrej Lichtner <olichtne(a)redhat.com>
Calling parent_dev.up() from Vxlan caused crashes due to deadlocks.
Using the recently added method link_up() solves this issue. I modified
this for the Vlan device as well since it's cleaner than explicitly
calling an ip command.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Slave/NetConfigDevice.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py
index dd053a6..6ef3f1c 100644
--- a/lnst/Slave/NetConfigDevice.py
+++ b/lnst/Slave/NetConfigDevice.py
@@ -280,7 +280,7 @@ class NetConfigDeviceVlan(NetConfigDeviceGeneric):
def up(self):
parent_id = get_slaves(self._dev_config)[0]
parent_dev = self._if_manager.get_mapped_device(parent_id)
- exec_cmd("ip link set %s up" % parent_dev.get_name())
+ parent_dev.link_up()
super(NetConfigDeviceVlan, self).up()
@@ -332,7 +332,7 @@ class NetConfigDeviceVxlan(NetConfigDeviceGeneric):
if len(slaves) == 1:
parent_id = get_slaves(self._dev_config)[0]
parent_dev = self._if_manager.get_mapped_device(parent_id)
- parent_dev.up()
+ parent_dev.link_up()
super(NetConfigDeviceVxlan, self).up()
--
2.8.2