[libvirt] XenStore fix

Daniel Veillard veillard at redhat.com
Tue Jul 28 08:15:10 UTC 2009


On Tue, Jul 28, 2009 at 08:30:12AM +0200, Jonas Eriksson wrote:
> Hi,
> 
> I have been examining a bug where libvirtd (and virsh) does not show
> all virtual machines on a xen host. This proved to be because of this
> program flow:
> 1. virConnectNumOfDomains -> .. -> xenUnifiedNumOfDomains
>    -> xenHypervisorNumOfDomains => 3
> 2. virConnectListDomains(max=3) -> .. -> xenUnifiedListDomains(max=3)
>    -> xenStoreNumOfDomains(max=3) => { 0, 2, 7 }

  Actually the problem I see is that ListDomains should really go
through the Hypervisor API i.e. xenHypervisorListDomains(), which
is *way* faster and garanteed to be acurate. We should try the
hypervisor first, IMHO, the function code was modified end of last year
to avoid Xend not properly cleaning up:

http://www.mail-archive.com/libvir-list@redhat.com/msg09855.html

  The problem is that we have put xenstore driver call first, while
it's clearly slower and has a higher chance of getting things wrong than
the hypervisor itself (if the HV get it wrong I guess there is no cure :-)

  Could you try changing xenUnifiedListDomains() and make the
xenHypervisorListDomains try first, then check if it still works with
3.3, if yes that's even better. Now the patch looks reasonable to me
but I think the reorder should be done too if this works, and will lead
to really good results ... as long as the hypercall works.

  thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list