[ovs-dev] [PATCH] vswitchd: Make names of Bridge external_ids generic.

Ben Pfaff blp at nicira.com
Wed Mar 24 22:19:40 UTC 2010


Thanks, I pushed this out.

On Wed, Mar 24, 2010 at 02:21:25PM -0700, Justin Pettit wrote:
> Looks good to me.
> 
> --Justin
> 
> 
> On Mar 18, 2010, at 9:37 AM, Ben Pfaff wrote:
> 
> > 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 at citrix.com>
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> > tests/interface-reconfigure.at                     |   12 ++++++------
> > vswitchd/vswitch.xml                               |   11 +++++++----
> > xenserver/README                                   |    4 ++--
> > xenserver/automake.mk                              |    2 +-
> > xenserver/etc_xensource_scripts_vif                |    4 ++--
> > ...ensource_libexec_InterfaceReconfigureVswitch.py |    8 ++++----
> > ...sr_share_vswitch_scripts_refresh-network-uuids} |    0
> > xenserver/vswitch-xen.spec                         |    6 +++---
> > 8 files changed, 25 insertions(+), 22 deletions(-)
> > rename xenserver/{usr_share_vswitch_scripts_refresh-xs-network-uuids => usr_share_vswitch_scripts_refresh-network-uuids} (100%)
> > 
> > diff --git a/tests/interface-reconfigure.at b/tests/interface-reconfigure.at
> > index 04f3255..feed280 100644
> > --- a/tests/interface-reconfigure.at
> > +++ b/tests/interface-reconfigure.at
> > @@ -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
> > diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
> > index 24a2d9c..e6ad387 100644
> > --- a/vswitchd/vswitch.xml
> > +++ b/vswitchd/vswitch.xml
> > @@ -126,9 +126,12 @@
> >         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>
> > 
> > @@ -265,7 +268,7 @@
> >         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">
> > diff --git a/xenserver/README b/xenserver/README
> > index e35da5a..6dafdb4 100644
> > --- a/xenserver/README
> > +++ b/xenserver/README
> > @@ -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.
> > 
> > diff --git a/xenserver/automake.mk b/xenserver/automake.mk
> > index c65b132..dde4105 100644
> > --- a/xenserver/automake.mk
> > +++ b/xenserver/automake.mk
> > @@ -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
> > diff --git a/xenserver/etc_xensource_scripts_vif b/xenserver/etc_xensource_scripts_vif
> > index ab9a56e..56c710d 100755
> > --- a/xenserver/etc_xensource_scripts_vif
> > +++ b/xenserver/etc_xensource_scripts_vif
> > @@ -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
> > }
> > diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py
> > index 5fb7a92..6b60cb0 100644
> > --- a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py
> > +++ b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py
> > @@ -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-xs-network-uuids b/xenserver/usr_share_vswitch_scripts_refresh-network-uuids
> > similarity index 100%
> > rename from xenserver/usr_share_vswitch_scripts_refresh-xs-network-uuids
> > rename to xenserver/usr_share_vswitch_scripts_refresh-network-uuids
> > diff --git a/xenserver/vswitch-xen.spec b/xenserver/vswitch-xen.spec
> > index 3d2bb75..ad0fba4 100644
> > --- a/xenserver/vswitch-xen.spec
> > +++ b/xenserver/vswitch-xen.spec
> > @@ -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
> > -- 
> > 1.6.6.1
> > 
> > 
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
> 




More information about the dev mailing list