[libvirt] [PATCH 2/3] conf: Check for user aliases duplicates only

Peter Krempa pkrempa at redhat.com
Mon Mar 12 08:52:41 UTC 2018

On Fri, Mar 09, 2018 at 12:56:12 +0100, Michal Privoznik wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1553162
> When validating a device XML config we check if user provided
> alias is unique. We do this by maintaining a hash table of device
> aliases as we iterated over all devices defined for the domain.
> However, it may happen that what appears as two devices in domain
> XML is in fact just one interface in hypervisor. For instance in
> qemu driver this is true for uhci/ehci controllers. In that case
> an error is reported even though it is not actually an error. At
> any rate, we can assume libvirt generated aliases to be unique
> and thus really check user provided ones only.

So I find some parts of this description slightly misleading. I agree
that we should only validate that the user-provided aliases are unique,
since libvirt should do the proper thing otherwise and the user-aliases
are in it's own namespace.

I think though that the hint to the usb controller requiring multiple
devices from the libvirt view map to a single device in qemu, or any
other reason why two libvirt entries should have the same alias is not
future-proof enough. With this commit you make it possible to use it
with the default alias, but it still might be possible to use with a
user alias.

ACK to this patch, since I think it's the correct thing to do, but
please delete the irrelevant blurb about uhci/ehci in qemu.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180312/5c7f2a18/attachment-0001.sig>

More information about the libvir-list mailing list