[ovs-dev] [suse 3/7] xenserver: Generate system UUID for non-XenServer systems.
Justin Pettit
jpettit at nicira.com
Tue Dec 28 19:07:18 UTC 2010
On Dec 15, 2010, at 11:19 AM, Ben Pfaff wrote:
> diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch
> index a81643d..de749a1 100755
> --- a/xenserver/etc_init.d_openvswitch
> +++ b/xenserver/etc_init.d_openvswitch
> @@ -341,7 +341,15 @@ function set_system_ids {
> external-ids:system-id="$INSTALLATION_UUID" \
> external-ids:xs-system-uuid="$INSTALLATION_UUID"
> else
> - action "Configuring Open vSwitch system IDs" false
> + if [ -f /etc/openvswitch/install_uuid.conf ]; then
> + . /etc/openvswitch/install_uuid.conf
> + else
> + INSTALLATION_UUID=`uuidgen`
Is uuidgen guaranteed to be on all reasonable distros by default?
> + echo "INSTALLATION_UUID=$INSTALLATION_UUID" > /etc/openvswitch/install_uuid.conf
Should we make sure that "/etc/openvswitch" exists?
> + fi
> + $vsctl --no-wait --timeout=5 set Open_vSwitch . \
> + external-ids:system-id="$INSTALLATION_UUID"
> + action "Configuring Open vSwitch system IDs" true
> fi
> }
Since this patch, we've added the OVS version to the database. It would be good to add it here, too.
--Justin
More information about the dev
mailing list