xenserver: Delete port ingress policing settings when adding vif.
authorBen Pfaff <blp@nicira.com>
Mon, 18 May 2009 22:31:59 +0000 (15:31 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 21 May 2009 19:48:39 +0000 (12:48 -0700)
When we add a new vif, we should not retain any prior ingress policing
settings from previous incarnations of a vif with the given name.

Bug #1328.

xenserver/etc_xensource_scripts_vif
xenserver/opt_xensource_libexec_interface-reconfigure

index 5195c0dfae3510b2c27b6221ca12097b444be23d..2c73768eed9a260c382c3186261548ca46c62d04 100755 (executable)
@@ -89,6 +89,7 @@ add_to_bridge()
     $cfg_mod -F /etc/ovs-vswitchd.conf \
         --del-match="bridge.*.port=$vif" \
         --del-match="vlan.$vif.[!0-9]*" \
+        --del-match="port.$vif.[!0-9]*" \
         --add="bridge.$bridge.port=$vif" \
         $vid -c
     $service vswitch reload
@@ -123,6 +124,7 @@ remove)
        logger -t scripts-vif "${vif} has been removed"
         $cfg_mod -vANY:console:emer -F /etc/ovs-vswitchd.conf \
             --del-match="bridge.*.port=${vif}" \
-           --del-match="vlan.${vif}.[!0-9]*" -c
+           --del-match="vlan.${vif}.[!0-9]*" \
+           --del-match="port.${vif}.[!0-9]*" -c
        ;;
 esac
index 54f26748ddbe5000f2c1f11d4755985530c8c06b..7d196ac5ef90c7195be8e0f569d9a675bcadc66b 100755 (executable)
@@ -525,6 +525,7 @@ def interface_deconfigure_commands(interface):
             '--del-match=bonding.%s.[!0-9]*' % interface,
             '--del-match=bonding.*.slave=%s' % interface,
             '--del-match=vlan.%s.[!0-9]*' % interface,
+            '--del-match=port.%s.[!0-9]*' % interface,
             '--del-match=iface.%s.[!0-9]*' % interface]
 
 def run_command(command):