[Pkg-libvirt-maintainers] Bug#683313: libvirtd8) does not generate valid RFC 4122 UUIDs

Aaron Toponce aaron.toponce at gmail.com
Mon Jul 30 17:28:57 UTC 2012


Package: libvirt-bin
Version: 0.9.12-3

When viewing the contents of the /etc/libvirt/qemu/*.xml files, the UUID
strings should be conformant to RFC 4122, which states that the version
bit should be one of 1, 2, 3, 4, or 5 and the variant bit should be one of
8, 9, a, or b. However, I have the following UUIDs for VMs, none of which
are valid: http://ae7.st/p/5z7.

According to a discussion I had in #virt on OFTC:

    <eblake> right now, libvirt is just using a random-number generator on
    every single bit
    <eblake> since rfc 4122 has restrictions on certain bits, then there's
    obviously a patch waiting to be written

Because the UUIDs are randomly generated, they should be version 4 strings
then. Thus, they should have the format of:

    XXXXXXXX-XXXX-4XXX-YXXX-XXXXXXXXXXXX

where '4' is statically set, and 'Y' should be one of '8', '9', 'a', or
'b'. The /proc/sys/kernel/random/uuid random number generator could work as
a source for those running the Linux kernel.

While it may not be technically hurting anything at this point, it should
still conform to the RFCs.

-- 
. o .   o . o   . . o   o . .   . o .
. . o   . o o   o . o   . o o   . . o
o o o   . o .   . o o   o o .   o o o
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 519 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-libvirt-maintainers/attachments/20120730/20287904/attachment.pgp>


More information about the Pkg-libvirt-maintainers mailing list