WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH 3 of 7] [PATCH] vswitch: interface-reconfigure: bring d

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 3 of 7] [PATCH] vswitch: interface-reconfigure: bring down physical interfaces
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Thu, 8 Jul 2010 14:30:45 +0100
Delivery-date: Thu, 08 Jul 2010 06:42:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1278595842@ely>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1278595842@ely>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
# 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