We need to issue domain undefine event on finish step if
we removing domain from domain list as vz sdk event handler will
not do it for us.
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
---
src/vz/vz_driver.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index 425d89a..46c6b4b 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -2623,9 +2623,18 @@ vzDomainMigrateFinish3Params(virConnectPtr dconn,
return NULL;
if (cancelled) {
+ virObjectEventPtr event = NULL;
+
if (!(dom = virDomainObjListFindByName(driver->domains, name)))
return NULL;
+ event = virDomainEventLifecycleNewFromObj(dom,
+ VIR_DOMAIN_EVENT_UNDEFINED,
+ VIR_DOMAIN_EVENT_UNDEFINED_REMOVED);
+
+ if (event)
+ virObjectEventStateQueue(driver->domainEventState, event);
+
virDomainObjListRemove(driver->domains, dom);
virObjectUnref(dom);
--
1.8.3.1