vswitchd: Make names of Bridge external_ids generic.
authorBen Pfaff <blp@nicira.com>
Thu, 18 Mar 2010 16:37:31 +0000 (09:37 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 24 Mar 2010 21:56:53 +0000 (14:56 -0700)
Until now the names of the external_ids keys used for Bridge records have
implied that they are specific to XenServer, because they begin with "xs-".
They are more generic in intent, however, so this commit removes the "xs-"
prefix and explains them more generically.

This finishes the renaming process started in commit c0f9490 "vswitchd:
Make names of Interface external_ids generic."

CC: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tests/interface-reconfigure.at
vswitchd/vswitch.xml
xenserver/README
xenserver/automake.mk
xenserver/etc_xensource_scripts_vif
xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py
xenserver/usr_share_vswitch_scripts_refresh-network-uuids [new file with mode: 0755]
xenserver/usr_share_vswitch_scripts_refresh-xs-network-uuids [deleted file]
xenserver/vswitch-xen.spec

index 04f32552fadb7cb1780b8e519062b3ad85bd27d5..feed2804e0cfcf0aabce7b5ab5d210c4a6088a45 100644 (file)
@@ -653,7 +653,7 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xenbr2 configuration
     --with-iface --if-exists del-port eth2
     --may-exist add-br xenbr2
     --may-exist add-port xenbr2 eth2
-    br-set-external-id xenbr2 xs-network-uuids d08c8749-0c8f-9e8d-ce25-fd364661ee99
+    br-set-external-id xenbr2 network-uuids d08c8749-0c8f-9e8d-ce25-fd364661ee99
     set Interface xenbr2 MAC="00:15:17:a0:29:80"
 /sbin/ifup xenbr2
 /sbin/update-issue
@@ -716,11 +716,11 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi3 configuration
     --with-iface --if-exists del-port eth3
     --may-exist add-br xenbr3
     --may-exist add-port xenbr3 eth3
-    br-set-external-id xenbr3 xs-network-uuids 2902ae1b-8013-897a-b697-0b200ea3aaa5;db7bdc03-074d-42ae-fc73-9b06de1d57f6
+    br-set-external-id xenbr3 network-uuids 2902ae1b-8013-897a-b697-0b200ea3aaa5;db7bdc03-074d-42ae-fc73-9b06de1d57f6
     set Interface xenbr3 MAC="00:15:17:a0:29:81"
     --if-exists del-br xapi3
     --may-exist add-br xapi3 xenbr3 123
-    br-set-external-id xapi3 xs-network-uuids 2902ae1b-8013-897a-b697-0b200ea3aaa5;db7bdc03-074d-42ae-fc73-9b06de1d57f6
+    br-set-external-id xapi3 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
@@ -801,7 +801,7 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi1 configuration
     --with-iface --if-exists del-port bond0
     --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
-    br-set-external-id xapi1 xs-network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
+    br-set-external-id xapi1 network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
     set Interface xapi1 MAC="00:22:19:22:4b:af"
 /sbin/ifup xapi1
 action_up: bring up bond0
@@ -882,11 +882,11 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi2 configuration
     --with-iface --if-exists del-port bond0
     --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
-    br-set-external-id xapi1 xs-network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
+    br-set-external-id xapi1 network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
     set Interface xapi1 MAC="00:22:19:22:4b:af"
     --if-exists del-br xapi2
     --may-exist add-br xapi2 xapi1 4
-    br-set-external-id xapi2 xs-network-uuids 99be2da4-6c33-6f8e-49ea-3bc592fe3c85;45cbbb43-113d-a712-3231-c6463f253cef
+    br-set-external-id xapi2 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 24a2d9c1af1b2dec267e9ba26ca97bd918d7c727..e6ad3872701c17fc98141e0c3d9120e0776aad9e 100644 (file)
         Key-value pairs that identify this bridge's role in external systems.
         The currently defined key-value pairs are:
         <dl>
-          <dt><code>xs-network-uuids</code></dt>
-          <dd>Space-delimited set of the Citrix XenServer network UUIDs with
-            which this bridge is associated.</dd>
+          <dt><code>network-uuids</code></dt>
+          <dd>Space-delimited set of universally unique identifier(s) for the
+            network with which this bridge is associated.  The form of the
+            identifier(s) depends on the type of the host.  On a Citrix
+            XenServer host, the network identifiers are RFC 4122 UUIDs as
+            displayed by, e.g., <code>xe network-list</code>.</dd>
         </dl>
       </column>
 
         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-xs-network-uuids</code>.
+        e.g. <code>fake-bridge-network-uuids</code>.
       </column>
 
       <column name="other_config">
index e35da5ac5bbb8b4b06f9bd4288a38c55293040f4..6dafdb4028eb28e8118b5fce937eb4c982754e38 100644 (file)
@@ -44,9 +44,9 @@ files are:
 
         vswitch-aware replacement for Citrix script of the same name.
 
-    usr_share_vswitch_scripts_refresh-xs-network-uuids
+    usr_share_vswitch_scripts_refresh-network-uuids
 
-        Script to refresh bridge.<bridge>.xs-network-uuids keys, which
+        Script to refresh bridge.<bridge>.network-uuids keys, which
         can get out-of-sync following a pool join.  Running this script
         is an alternative to rebooting the host.
 
index c65b132636dddd65f08aaed774ee12b76c4cc892..dde4105e663afdc1fedad604b54fa75057ebd532 100644 (file)
@@ -22,6 +22,6 @@ EXTRA_DIST += \
        xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py \
        xenserver/usr_sbin_brctl \
        xenserver/usr_sbin_xen-bugtool \
-       xenserver/usr_share_vswitch_scripts_refresh-xs-network-uuids \
+       xenserver/usr_share_vswitch_scripts_refresh-network-uuids \
        xenserver/usr_share_vswitch_scripts_sysconfig.template \
        xenserver/vswitch-xen.spec
index ab9a56ee17a8295da6f6b9d03d724bf29df9bb32..56c710d814cfbd679b5ca23ddb171fa8384c6f6b 100755 (executable)
@@ -133,8 +133,8 @@ xs550_set_internal_network_uuid()
         local bridge=$1
         local net_uuid=$(xenstore-read "${PRIVATE}/network-uuid" 2>/dev/null)
         if [ -n "${net_uuid}" ] ; then
-            logger -t scripts-vif "${bridge} xs-network-uuids ${net_uuid}"
-            echo "-- br-set-external-id $bridge xs-network-uuids ${net_uuid}"
+            logger -t scripts-vif "${bridge} network-uuids ${net_uuid}"
+            echo "-- br-set-external-id $bridge network-uuids ${net_uuid}"
         fi
     fi
 }
index 5fb7a92bd0bed0f0b3f20155ce0acd0fba0cb9e2..6b60cb073e81b8608cb9252fe1b17a5c55af495e 100644 (file)
@@ -333,9 +333,9 @@ def set_br_external_ids(pif):
         xs_network_uuids += [nwrec['uuid']]
 
     vsctl_argv = []
-    vsctl_argv += ['# configure xs-network-uuids']
+    vsctl_argv += ['# configure network-uuids']
     vsctl_argv += ['--', 'br-set-external-id', pif_bridge_name(pif),
-            'xs-network-uuids', ';'.join(xs_network_uuids)]
+            'network-uuids', ';'.join(xs_network_uuids)]
 
     vsctl_argv += ['# configure MAC']
     vsctl_argv += ['--', 'set', 'Interface', pif_ipdev_name(pif),
@@ -438,8 +438,8 @@ class DatapathVswitch(Datapath):
 
         #nw = db().get_pif_record(self._pif)['network']
         #nwrec = db().get_network_record(nw)
-        #vsctl_argv += ['# deconfigure xs-network-uuids']
-        #vsctl_argv += ['--del-entry=bridge.%s.xs-network-uuids=%s' % (bridge,nwrec['uuid'])]
+        #vsctl_argv += ['# deconfigure network-uuids']
+        #vsctl_argv += ['--del-entry=bridge.%s.network-uuids=%s' % (bridge,nwrec['uuid'])]
 
         log("deconfigure ipdev %s on %s" % (ipdev,bridge))
         vsctl_argv += ["# deconfigure ipdev %s" % ipdev]
diff --git a/xenserver/usr_share_vswitch_scripts_refresh-network-uuids b/xenserver/usr_share_vswitch_scripts_refresh-network-uuids
new file mode 100755 (executable)
index 0000000..34fe1e7
--- /dev/null
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+. /etc/xensource-inventory
+
+for pif in $(xe pif-list --minimal host-uuid=${INSTALLATION_UUID} currently-attached=true VLAN=-1 | sed 's/,/ /g'); do
+    printf "Refreshing PIF %s...  " $pif
+    if /opt/xensource/libexec/interface-reconfigure --pif-uuid=$pif up; then
+        printf "done\n"
+    else
+        printf "error!\n"
+    fi
+done
diff --git a/xenserver/usr_share_vswitch_scripts_refresh-xs-network-uuids b/xenserver/usr_share_vswitch_scripts_refresh-xs-network-uuids
deleted file mode 100755 (executable)
index 34fe1e7..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-. /etc/xensource-inventory
-
-for pif in $(xe pif-list --minimal host-uuid=${INSTALLATION_UUID} currently-attached=true VLAN=-1 | sed 's/,/ /g'); do
-    printf "Refreshing PIF %s...  " $pif
-    if /opt/xensource/libexec/interface-reconfigure --pif-uuid=$pif up; then
-        printf "done\n"
-    else
-        printf "error!\n"
-    fi
-done
index 3d2bb75495551ad61cbb18d0e07fd2021cd53622..ad0fba4145e4b3d5423b253a68a6ed563c4d749e 100644 (file)
@@ -80,8 +80,8 @@ install -m 644 xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py \
              $RPM_BUILD_ROOT/usr/share/vswitch/scripts/InterfaceReconfigureVswitch.py
 install -m 755 xenserver/etc_xensource_scripts_vif \
              $RPM_BUILD_ROOT/usr/share/vswitch/scripts/vif
-install -m 755 xenserver/usr_share_vswitch_scripts_refresh-xs-network-uuids \
-               $RPM_BUILD_ROOT/usr/share/vswitch/scripts/refresh-xs-network-uuids
+install -m 755 xenserver/usr_share_vswitch_scripts_refresh-network-uuids \
+               $RPM_BUILD_ROOT/usr/share/vswitch/scripts/refresh-network-uuids
 install -m 755 xenserver/usr_sbin_xen-bugtool \
              $RPM_BUILD_ROOT/usr/share/vswitch/scripts/xen-bugtool
 install -m 755 xenserver/usr_sbin_brctl \
@@ -339,7 +339,7 @@ fi
 %if %(echo '%{xen_version}'|awk -F"." '{if ($3>=18) print 1; else print 0;}')
 /lib/modules/%{xen_version}/kernel/net/vswitch/ip_gre_mod.ko
 %endif
-/usr/share/vswitch/scripts/refresh-xs-network-uuids
+/usr/share/vswitch/scripts/refresh-network-uuids
 /usr/share/vswitch/scripts/interface-reconfigure
 /usr/share/vswitch/scripts/InterfaceReconfigure.py
 /usr/share/vswitch/scripts/InterfaceReconfigureBridge.py