[Ovirt-devel] [PATCH] Changed the source for UUID to be dmidecode for now.

Alan Pevec apevec at redhat.com
Thu Jun 26 09:20:39 UTC 2008


Chris Lalancette wrote:
> Chris Lalancette wrote:
>> OK.  I think this is almost right, but still needs to be changed a little, since
>> we should always send over a UUID.  So something like this:
>>
>> VENDOR=`dmidecode | awk ' /Vendor/{ print $2; } '`
>> UUID=`dmidecode | awk ' /UUID/{ print $2; } '`
>> if [ -z "$UUID" -o "$VENDOR" = "QEMU" ]; then
>> 	UUID=get_my_hostname
>> fi
>>
>> ovirt-identify-node -s $SRV_HOST -p $SRV_PORT -u $UUID
>>
>> That way you always have some UUID, either the value from the DMI tables in the
>> case of bare-metal, or the hostname in the case of QEMU/KVM guest or missing
>> UUID in bare-metal.
> 
> And just in case anyone thinks that I'm making stuff up about the UUID's missing
> on bare-metal, of the 4 pieces of hardware that I have locally, only 1 of them
> has a valid UUID.  The other 3 either have:
> 
> UUID: Not Settable
> 
> or
> 
> UUID: Not Present

I was going to say this is just Chris' beta HW and that we could simply check UUID format ( http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Text_encoding )
but then I saw on my (also beta HW) box: UUID: BBBCBDBE-BFC0-C1C2-C3C4-C5C6C7C8C9CA
syntactically correct but obviously fake.

One solution could be, provided we have local persistent storage on the node, to generate UUID on first boot, store it and send it on subsequent reboots.
But for stateless we're stuck w/ hostname I guess




More information about the ovirt-devel mailing list