[ovs-dev] [PATCH 08/12] xenserver: Remove a VLAN's bridge when bringing down its PIF.

Ben Pfaff blp at nicira.com
Tue Feb 23 00:42:44 UTC 2010


Before, interface-reconfigure would only bring remove a VLAN's bridge
incidentally as part of removing its datapath's bridge.  This commit fixes
it.
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py
index c60dec1..99eca11 100644
--- a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py
+++ b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py
@@ -276,7 +276,7 @@ def configure_datapath(pif):
     vsctl_argv += set_br_external_ids(pif)
     return vsctl_argv,extra_up_ports
 
-def deconfigure_datapath(pif):
+def deconfigure_bridge(pif):
     vsctl_argv = []
 
     bridge = pif_bridge_name(pif)
@@ -416,6 +416,9 @@ class DatapathVswitch(Datapath):
         vsctl_argv += datapath_deconfigure_ipdev(ipdev)
 
         if pif_is_vlan(self._pif):
+            # Delete the VLAN bridge.
+            vsctl_argv += deconfigure_bridge(self._pif)
+
             # If the VLAN's slave is attached, leave datapath setup.
             slave = pif_get_vlan_slave(self._pif)
             if db().get_pif_record(slave)['currently_attached']:
@@ -439,6 +442,6 @@ class DatapathVswitch(Datapath):
                 dp = None
 
         if dp:
-            vsctl_argv += deconfigure_datapath(dp)
+            vsctl_argv += deconfigure_bridge(dp)
 
         datapath_modify_config(vsctl_argv)
-- 
1.6.6.1





More information about the dev mailing list