mirror of
https://github.com/openvswitch/ovs
synced 2025-10-21 14:49:41 +00:00
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 <blp@nicira.com>
This commit is contained in:
@@ -260,7 +260,7 @@ def configure_datapath(pif):
|
|||||||
vsctl_argv += set_br_external_ids(pif)
|
vsctl_argv += set_br_external_ids(pif)
|
||||||
return vsctl_argv,extra_up_ports
|
return vsctl_argv,extra_up_ports
|
||||||
|
|
||||||
def deconfigure_datapath(pif):
|
def deconfigure_bridge(pif):
|
||||||
vsctl_argv = []
|
vsctl_argv = []
|
||||||
|
|
||||||
bridge = pif_bridge_name(pif)
|
bridge = pif_bridge_name(pif)
|
||||||
@@ -400,6 +400,9 @@ class DatapathVswitch(Datapath):
|
|||||||
vsctl_argv += datapath_deconfigure_ipdev(ipdev)
|
vsctl_argv += datapath_deconfigure_ipdev(ipdev)
|
||||||
|
|
||||||
if pif_is_vlan(self._pif):
|
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.
|
# If the VLAN's slave is attached, leave datapath setup.
|
||||||
slave = pif_get_vlan_slave(self._pif)
|
slave = pif_get_vlan_slave(self._pif)
|
||||||
if db().get_pif_record(slave)['currently_attached']:
|
if db().get_pif_record(slave)['currently_attached']:
|
||||||
@@ -423,6 +426,6 @@ class DatapathVswitch(Datapath):
|
|||||||
dp = None
|
dp = None
|
||||||
|
|
||||||
if dp:
|
if dp:
|
||||||
vsctl_argv += deconfigure_datapath(dp)
|
vsctl_argv += deconfigure_bridge(dp)
|
||||||
|
|
||||||
datapath_modify_config(vsctl_argv)
|
datapath_modify_config(vsctl_argv)
|
||||||
|
Reference in New Issue
Block a user