From 7966caf4a08629f7d0498427420ef83b44838f44 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 22 Feb 2010 13:32:01 -0800 Subject: [PATCH] xenserver: Remove a VLAN's bridge when bringing down its PIF. Before, interface-reconfigure would only bring remove a VLAN's bridge incidentally as part of removing its datapath's bridge. This commit fixes it. Signed-off-by: Ben Pfaff --- .../opt_xensource_libexec_InterfaceReconfigureVswitch.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py index 1dcac61d..73c0104a 100644 --- a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py +++ b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py @@ -260,7 +260,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) @@ -400,6 +400,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']: @@ -423,6 +426,6 @@ class DatapathVswitch(Datapath): dp = None if dp: - vsctl_argv += deconfigure_datapath(dp) + vsctl_argv += deconfigure_bridge(dp) datapath_modify_config(vsctl_argv) -- 2.30.2