[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH 3 of 7] [PATCH] vswitch: interface-reconfigure: bring down physical interfaces



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1278595821 -3600
# Node ID e57360c174aa2444c491abc67a52e90064071a91
# Parent  bb3a7296251f5d6aabcaaf30e7c3c15c45c2eb90
[PATCH] vswitch: interface-reconfigure: bring down physical interfaces

>From df9a459ab60259b88610ac781889f69b73fbffad Mon Sep 17 00:00:00 2001
Date: Thu, 25 Feb 2010 16:15:13 +0000
This should be done when bringing down the last PIF which uses a
datapath in order to account for VLAN PIFs sharing a datapath.

The logic in bring_down() already acounts for this requirement by
clearing the dp variable if the datapath is still required so if we
get as far as deconfiguring that datapath then it is also correct to
bring down the physical devices.

With unit test suite update by Ben Pfaff.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    7 +++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff -r bb3a7296251f -r e57360c174aa scripts/InterfaceReconfigureVswitch.py
--- a/scripts/InterfaceReconfigureVswitch.py    Thu Jul 08 14:30:20 2010 +0100
+++ b/scripts/InterfaceReconfigureVswitch.py    Thu Jul 08 14:30:21 2010 +0100
@@ -434,4 +434,11 @@
         if dp:
             vsctl_argv += deconfigure_bridge(dp)
 
+            physical_devices = [pif_netdev_name(p) for p in 
datapath_get_physical_pifs(dp)]
+
+            log("action_down: bring down physical devices - %s" % 
physical_devices)
+        
+            for p in physical_devices:
+                netdev_down(p)
+
         datapath_modify_config(vsctl_argv)
 scripts/InterfaceReconfigureVswitch.py |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)


Attachment: vswitch_interface-reconfigure_bring_down_physical_interfaces.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.