[Ovirt-devel] [PATCH] Changed the source for UUID to be dmidecode for now.
Darryl L. Pierce
dpierce at redhat.com
Thu Jun 26 11:03:38 UTC 2008
Chris Lalancette wrote:
>> +dmidecode
>
> Have you checked what the dmidecode package does to the size of the managed node
> image? I'm sure the package itself is small, but I'm just wondering about it's
> dependencies. As long as the resulting image is still < 64MB, it's no problem
> at all. If it brings in a lot of dependencies, we'll have to look at trying to
> cut them down.
My ISO is 59MB in size.
>> + VENDOR=`dmidecode | grep Vendor | awk ' { print $2; } '`
>> + UUID=`dmidecode | grep UUID | awk ' { print $2; } '`
>> +
>> + if [ $VENDOR != "QEMU" ]; then
>> + ovirt-identify-node -s $SRV_HOST -p $SRV_PORT -u $UUID
>> + else
>> + ovirt-identify-node -s $SRV_HOST -p $SRV_PORT
>> + fi
>> +
>
> 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.
Inside of ovirt-identify-node it checks if a UUID was supplied and, if
not, grabs the hostname. The plan here is, when libvirt supports getting
a UUID, removing this external code and having ovirt-identify-node do
all of the work internal via libvirt APIs. I'll add an explicit comment
in the code to cover that.
Thanks for the feedback. :)
--
Darryl L. Pierce, Sr. Software Engineer
Red Hat, Inc. - http://www.redhat.com/
oVirt - Virtual Machine Management - http://www.ovirt.org/
"What do you care what other people think, Mr. Feynman?"
More information about the ovirt-devel
mailing list