Re: [PATCH] conf: Do not load domain if the domain with same already exists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



于 2011年08月16日 22:58, Eric Blake 写道:
On 08/16/2011 09:05 AM, Osier Yang wrote:
We don't allow to define domain with same name and different UUID,
or with same UUID, so it's reasonable to not load the domain config
if there is domain with same name already exists.

Otherwise it can cause problem like:

1) % cp /etc/libvirt/qemu/dom.xml /etc/libvirt/qemu/dom_diffuuid.xml
> 2) remove the line with "uuid" in the "dom_diffuuid.xml"

This is invalid. Users should not be mucking with /etc/libvirt, but rather going through libvirt APIs. Is there any way, using only libvirt APIs, where /etc/libvirt can end up with a domain without a uuid? If not, then NACK to this patch, and instead fix the test scenario that was driving this patch to quit going behind libvirt's back.

There will be 11 domains listed with the same name, as if there is
no UUID specified in domain XML, libvirt will generate one for it,
which will be definitely different with the original one.

Libvirt should have already generated a uuid for all domains already in /etc/libvirt; if there is no way for /etc/libvirt to have a domain without a uuid in /etc/libvirt short of going behind libvirt's back, then doing a name lookup won't buy us any safety.


I don't see a way to cause a domain has no UUID though libvirt
APIs, so self NACK this.

Thanks
Osier

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]