Patches 1 and 2 make preparation for patch 4 Patch 3 fixes notification subscription To get domain info we should receive and handle notification from hypervisor Patch 4 fixes race condition when adding domain to domains list Race condition: User calls defineXML to create new instance. The main thread from vzDomainDefineXMLFlags() creates new instance by prlsdkCreateVm. Then this thread calls prlsdkAddDomain to add new domain to domains list. The second thread receives notification from hypervisor that new VM was created. It calls prlsdkHandleVmAddedEvent() and also tries to add new domain to domains list. These two threads call virDomainObjListFindByUUID() from prlsdkAddDomain() and don't find new domain. So they add two domains with the same uuid to domains list. Mikhail Feoktistov (4): vz: make output arguments in prlsdkGetDomainIds as optional vz: remove unused struct field vz: fix notification subscription vz: fix race condition when adding domain to domains list src/vz/vz_driver.c | 13 ++- src/vz/vz_sdk.c | 293 +++++++++++++++++++++++++++-------------------------- src/vz/vz_sdk.h | 9 +- src/vz/vz_utils.h | 1 - 4 files changed, 165 insertions(+), 151 deletions(-) -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list