From: Ondrej Lichtner <olichtne(a)redhat.com>
When the deconfigure_all method of the InterfaceManager is called we do
not listen to netlink updates between device deconfigurations. This
results in the master being deconfigured by each associated slave and
raising an exception. This commit fixes that.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Slave/InterfaceManager.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lnst/Slave/InterfaceManager.py b/lnst/Slave/InterfaceManager.py
index 94153ed..c120555 100644
--- a/lnst/Slave/InterfaceManager.py
+++ b/lnst/Slave/InterfaceManager.py
@@ -227,7 +227,8 @@ class Device(object):
def clear_configuration(self):
if self._master != None:
master_dev = self._if_manager.get_device(self._master)
- master_dev.clear_configuration()
+ if master_dev != None:
+ master_dev.clear_configuration()
if self._conf != None:
self.down()
@@ -243,7 +244,8 @@ class Device(object):
def deconfigure(self):
if self._master != None:
master_dev = self._if_manager.get_device(self._master)
- master_dev.deconfigure()
+ if master_dev != None:
+ master_dev.deconfigure()
if self._conf != None and self._configured:
self._conf.deconfigure()
--
1.8.5.3
Show replies by thread