[ovs-dev] [suse 3/7] xenserver: Generate system UUID for non-XenServer systems.
Patrick Mullaney
pm.mullaney at gmail.com
Thu Dec 30 21:53:38 UTC 2010
On Tue, 2010-12-28 at 11:07 -0800, Justin Pettit wrote:
> 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?
It is on suse. I believe it would be the same for rhat/centos, debian
and ubuntu but I haven't checked. In any case, checking for its
existence and printing a error in that case is probably a wise idea.
Thanks.
> > + 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