[Kimchi-devel] [PATCH] Remove bridge and vlan interface unconditionally on removing vlan network

Mark Wu wudxw at linux.vnet.ibm.com
Fri Mar 14 08:22:41 UTC 2014


It's observed that the low layer interfaces could be down for some reason,
such as that the physical interface is in disconnected state. In this case,
we still need destroy the interfaces to avoid that they're left on the system
util reboot.

Signed-off-by: Mark Wu <wudxw at linux.vnet.ibm.com>
---
 src/kimchi/model/networks.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/kimchi/model/networks.py b/src/kimchi/model/networks.py
index 0242156..38e42e9 100644
--- a/src/kimchi/model/networks.py
+++ b/src/kimchi/model/networks.py
@@ -336,6 +336,5 @@ class NetworkModel(object):
             if bridge.startswith('kimchi-'):
                 conn = self.conn.get()
                 iface = conn.interfaceLookupByName(bridge)
-                if iface.isActive():
-                    iface.destroy(0)
+                iface.destroy(0)
                 iface.undefine()
-- 
1.8.4.2




More information about the Kimchi-devel mailing list