commit d569cadd4c977b0a0aa44a45cdda81b355182d56 Author: Ondrej Lichtner olichtne@redhat.com Date: Wed Feb 19 11:51:33 2014 +0100
InterfaceManager: call master deconfiguration just once
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@redhat.com Signed-off-by: Jiri Pirko jiri@resnulli.us
lnst/Slave/InterfaceManager.py | 6 ++++-- 1 files 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()
lnst-developers@lists.fedorahosted.org