xenserver: Prepend XenServer external ids with "xs-"
authorJustin Pettit <jpettit@nicira.com>
Mon, 9 Aug 2010 22:07:32 +0000 (15:07 -0700)
committerJustin Pettit <jpettit@nicira.com>
Wed, 25 Aug 2010 23:48:21 +0000 (16:48 -0700)
Signed-off-by: Justin Pettit <jpettit@nicira.com>
tests/interface-reconfigure.at
vswitchd/vswitch.xml
xenserver/README
xenserver/automake.mk
xenserver/etc_xensource_scripts_vif
xenserver/openvswitch-xen.spec
xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py
xenserver/usr_share_openvswitch_scripts_refresh-network-uuids [deleted file]
xenserver/usr_share_openvswitch_scripts_refresh-xs-network-uuids [new file with mode: 0755]

index 69f9830a00d4715440fbb6e65fb4ba0a2ea05d64..880f4a508ccad98fdad7436b54c45eacd676a290 100644 (file)
@@ -654,7 +654,7 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xenbr2 configuration
     --may-exist add-br xenbr2
     --may-exist add-port xenbr2 eth2
     set Bridge xenbr2 other-config:hwaddr="00:15:17:a0:29:80"
-    br-set-external-id xenbr2 network-uuids d08c8749-0c8f-9e8d-ce25-fd364661ee99
+    br-set-external-id xenbr2 xs-network-uuids d08c8749-0c8f-9e8d-ce25-fd364661ee99
 /sbin/ifup xenbr2
 /sbin/update-issue
 Committing changes to /etc/sysconfig/network-scripts/route-xenbr2 configuration
@@ -717,10 +717,10 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi3 configuration
     --may-exist add-br xenbr3
     --may-exist add-port xenbr3 eth3
     set Bridge xenbr3 other-config:hwaddr="00:15:17:a0:29:81"
-    br-set-external-id xenbr3 network-uuids 2902ae1b-8013-897a-b697-0b200ea3aaa5;db7bdc03-074d-42ae-fc73-9b06de1d57f6
+    br-set-external-id xenbr3 xs-network-uuids 2902ae1b-8013-897a-b697-0b200ea3aaa5;db7bdc03-074d-42ae-fc73-9b06de1d57f6
     --if-exists del-br xapi3
     --may-exist add-br xapi3 xenbr3 123
-    br-set-external-id xapi3 network-uuids 2902ae1b-8013-897a-b697-0b200ea3aaa5;db7bdc03-074d-42ae-fc73-9b06de1d57f6
+    br-set-external-id xapi3 xs-network-uuids 2902ae1b-8013-897a-b697-0b200ea3aaa5;db7bdc03-074d-42ae-fc73-9b06de1d57f6
     set Interface xapi3 MAC="00:15:17:a0:29:81"
 /sbin/ifup xapi3
 /sbin/update-issue
@@ -802,7 +802,7 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi1 configuration
     --fake-iface add-bond xapi1 bond0 eth0 eth1
     set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:"bond-miimon"=100 other-config:"bond-use_carrier"=1 other-config:"bond-mode"="balance-slb" bond_updelay=31000
     set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af"
-    br-set-external-id xapi1 network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
+    br-set-external-id xapi1 xs-network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
 /sbin/ifup xapi1
 action_up: bring up bond0
 /sbin/ifconfig bond0 up
@@ -883,10 +883,10 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi2 configuration
     --fake-iface add-bond xapi1 bond0 eth0 eth1
     set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:"bond-miimon"=100 other-config:"bond-use_carrier"=1 other-config:"bond-mode"="balance-slb" bond_updelay=31000
     set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af"
-    br-set-external-id xapi1 network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
+    br-set-external-id xapi1 xs-network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
     --if-exists del-br xapi2
     --may-exist add-br xapi2 xapi1 4
-    br-set-external-id xapi2 network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
+    br-set-external-id xapi2 xs-network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
     set Interface xapi2 MAC="00:22:19:22:4b:af"
 /sbin/ifup xapi2
 action_up: bring up bond0
index 7d61aac7103e99eb27c677dfcdea4f6b8ee15902..38dc6a1aac03a5f4ea9818034d79b8c8c5749380 100644 (file)
           column), external IDs for the fake bridge are defined here by
           prefixing a <ref table="Bridge"/> <ref table="Bridge"
           column="external_ids"/> key with <code>fake-bridge-</code>,
-          e.g. <code>fake-bridge-network-uuids</code>.
+          e.g. <code>fake-bridge-xs-network-uuids</code>.
         </p>
       </column>
 
index 3b7809fc344c1a36372540b920182e26d923c340..db2bd297edbd2bc730ec1633635bb7da070b7bc4 100644 (file)
@@ -49,9 +49,9 @@ files are:
 
         Open vSwitch-aware replacement for Citrix script of the same name.
 
-    usr_share_openvswitch_scripts_refresh-network-uuids
+    usr_share_openvswitch_scripts_refresh-xs-network-uuids
 
-        Script to refresh Bridge table external-ids:network-uuids
+        Script to refresh Bridge table external-ids:xs-network-uuids
         values, which can get out-of-sync following a pool join.
 
     usr_share_openvswitch_scripts_sysconfig.template
index b16fef9bef08bbb3f42bbd67e665e0783d574989..fa5b466cec0af99d6367b3f8109b1f4412a04dfd 100644 (file)
@@ -23,6 +23,6 @@ EXTRA_DIST += \
        xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py \
        xenserver/usr_sbin_brctl \
        xenserver/usr_sbin_xen-bugtool \
-       xenserver/usr_share_openvswitch_scripts_refresh-network-uuids \
+       xenserver/usr_share_openvswitch_scripts_refresh-xs-network-uuids \
        xenserver/usr_share_openvswitch_scripts_sysconfig.template \
        xenserver/uuid.py
index fe8520523d89004b64b08e7c97a3906f29910f77..91b75c123997e6571e34a0135ec80ec472b06658 100755 (executable)
@@ -92,7 +92,7 @@ handle_vswitch_vif_details()
         local vm_uuid=$(xenstore-read "$vm/uuid" 2>/dev/null)
     fi
     if [ -n "${vm_uuid}" ] ; then
-        set_vif_external_id "vm-uuid" "${vm_uuid}"
+        set_vif_external_id "xs-vm-uuid" "${vm_uuid}"
     fi
 
     local vif_uuid=$(xenstore-read "${PRIVATE}/vif-uuid" 2>/dev/null)
@@ -100,7 +100,7 @@ handle_vswitch_vif_details()
         vif_uuid=$(xe vif-list --minimal vm-uuid="${vm_uuid}" device=$DEVID)
     fi
     if [ -n "${vif_uuid}" ] ; then
-        set_vif_external_id "vif-uuid" "${vif_uuid}"
+        set_vif_external_id "xs-vif-uuid" "${vif_uuid}"
     fi
 
     local vif_details=
@@ -109,12 +109,12 @@ handle_vswitch_vif_details()
         net_uuid=$(xe vif-param-get uuid="${vif_uuid}" param-name=network-uuid)
     fi
     if [ -n "${net_uuid}" ] ; then
-        set_vif_external_id "network-uuid" "${net_uuid}"
+        set_vif_external_id "xs-network-uuid" "${net_uuid}"
     fi
 
     local address=$(xenstore-read "/local/domain/$DOMID/device/vif/$DEVID/mac" 2>/dev/null)
     if [ -n "${address}" ] ; then
-        set_vif_external_id "vif-mac" "${address}"
+        set_vif_external_id "xs-vif-mac" "${address}"
     fi
 
     if $xs550; then
@@ -129,8 +129,8 @@ handle_vswitch_vif_details()
         # configuration variable, but vNetManager can tolerate that.
         local bridge=$1
         if [ -n "${net_uuid}" ] ; then
-            logger -t scripts-vif "${bridge} network-uuids ${net_uuid}"
-            echo "-- br-set-external-id $bridge network-uuids ${net_uuid}"
+            logger -t scripts-vif "${bridge} xs-network-uuids ${net_uuid}"
+            echo "-- br-set-external-id $bridge xs-network-uuids ${net_uuid}"
         fi
     fi
 }
index f693ea0db2009b8a0206d841b26e35a5d9e0bf83..80dbec70ca83c3d16ae97b77c2d056d4cd87e429 100644 (file)
@@ -73,8 +73,8 @@ install -m 644 xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py \
              $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/InterfaceReconfigureVswitch.py
 install -m 755 xenserver/etc_xensource_scripts_vif \
              $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/vif
-install -m 755 xenserver/usr_share_openvswitch_scripts_refresh-network-uuids \
-               $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/refresh-network-uuids
+install -m 755 xenserver/usr_share_openvswitch_scripts_refresh-xs-network-uuids \
+               $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/refresh-xs-network-uuids
 install -m 755 xenserver/usr_sbin_xen-bugtool \
              $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/xen-bugtool
 install -m 755 xenserver/usr_sbin_brctl \
@@ -158,12 +158,12 @@ EOF
     fi
 fi
 
-# On XenServer 5.5.0, we need refresh-network-uuids to run whenever
+# On XenServer 5.5.0, we need refresh-xs-network-uuids to run whenever
 # XAPI starts or restarts.  (On XenServer 5.6.0, XAPI calls the
 # "update" method of the vswitch-cfg-update plugin whenever it starts
 # or restarts, so this is no longer necessary.)
 if test "$PRODUCT_VERSION" = "5.5.0"; then
-    RNU=/usr/share/openvswitch/scripts/refresh-network-uuids
+    RNU=/usr/share/openvswitch/scripts/refresh-xs-network-uuids
     XSS=/opt/xensource/libexec/xapi-startup-script
     if test -e $XSS && (test ! -L $XSS || test "`readlink $XSS`" != $RNU); then
         echo "$XSS is already in use, refusing to overwrite"
@@ -390,7 +390,7 @@ fi
 /usr/share/openvswitch/python/ovs/timeval.py
 /usr/share/openvswitch/python/ovs/util.py
 /usr/share/openvswitch/python/uuid.py
-/usr/share/openvswitch/scripts/refresh-network-uuids
+/usr/share/openvswitch/scripts/refresh-xs-network-uuids
 /usr/share/openvswitch/scripts/interface-reconfigure
 /usr/share/openvswitch/scripts/InterfaceReconfigure.py
 /usr/share/openvswitch/scripts/InterfaceReconfigureBridge.py
index ef2f1fe67f881d4700eb3f0f87a3a90b01dc1505..bc311f80335325a929cbef1c71c3db4440a4d6fa 100644 (file)
@@ -345,9 +345,9 @@ def set_br_external_ids(pif):
         xs_network_uuids += [nwrec['uuid']]
 
     vsctl_argv = []
-    vsctl_argv += ['# configure network-uuids']
+    vsctl_argv += ['# configure xs-network-uuids']
     vsctl_argv += ['--', 'br-set-external-id', pif_bridge_name(pif),
-            'network-uuids', ';'.join(xs_network_uuids)]
+            'xs-network-uuids', ';'.join(xs_network_uuids)]
 
     return vsctl_argv
 
diff --git a/xenserver/usr_share_openvswitch_scripts_refresh-network-uuids b/xenserver/usr_share_openvswitch_scripts_refresh-network-uuids
deleted file mode 100755 (executable)
index 42ebe06..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#! /bin/sh
-exec /opt/xensource/libexec/interface-reconfigure rewrite
diff --git a/xenserver/usr_share_openvswitch_scripts_refresh-xs-network-uuids b/xenserver/usr_share_openvswitch_scripts_refresh-xs-network-uuids
new file mode 100755 (executable)
index 0000000..42ebe06
--- /dev/null
@@ -0,0 +1,2 @@
+#! /bin/sh
+exec /opt/xensource/libexec/interface-reconfigure rewrite