[libvirt] stateless drivers and stored lists of virDomainObjs

Dmitry Guryanov dguryanov at parallels.com
Tue Aug 14 16:59:06 UTC 2012


Hello,

vmware, openvz and parallels driver, which was written with first two ones
as an example, get list of domains in virConnectOpen and then use it for
lookups and even for listing sometimes. This is not correct, because you
can make several connections to the same driver and changes, made in one
connection will not be visible to other. And you can also create or
destroy domains using native tools.

So I think keeping list of domains in a stateless driver is a bad idea -
you should update this list each time when user requests some info. It's
better to retrieve needed data only when it requested, like in xenapi
driver.

I asked this because I want to continue developing parallels driver and it'=
s
not so hard to change it now, so it should be fixed before adding any new
code there. Maybe vmware and openvz drivers should be also fixed.

--
Dmitry Guryanov




More information about the libvir-list mailing list