[ovs-dev] [PATCH 07/12] xenserver: Avoid doing unneeded work in deconfigure_datapath().

Ian Campbell Ian.Campbell at citrix.com
Thu Feb 25 04:52:50 PST 2010


On Tue, 2010-02-23 at 00:42 +0000, Ben Pfaff wrote:
> Deleting a bridge deletes all of its ports, too, so there's no benefit in
> doing so manually beforehand.

This causes the physical devices to remain up when a PIF is unplugged. I
think the solution is to put back the part of the old code which does
netdev_down(). e.g.:

diff -r e24adc61cd6a scripts/InterfaceReconfigureVswitch.py
--- a/scripts/InterfaceReconfigureVswitch.py	Thu Feb 25 12:32:55 2010 +0000
+++ b/scripts/InterfaceReconfigureVswitch.py	Thu Feb 25 12:41:06 2010 +0000
@@ -269,8 +269,15 @@
     vsctl_argv = []
 
     bridge = pif_bridge_name(pif)
+    
+    physical_devices = datapath_get_physical_pifs(pif)
 
-    log("deconfigure_bridge: bridge           - %s" % bridge)
+    log("deconfigure_datapath: bridge           - %s" % bridge)
+    log("deconfigure_datapath: physical devices - %s" % [pif_netdev_name(p) for p in physical_devices])
+
+    for p in physical_devices:
+        dev = pif_netdev_name(p)
+        netdev_down(dev)
 
     vsctl_argv += ['# deconfigure bridge %s' % bridge]
     vsctl_argv += ['--', '--if-exists', 'del-br', bridge]

Just this has other side effects which break my test suite. I'll send a
more complete patch once I've got it to pass.

Ian.





More information about the dev mailing list