Re: [PATCH 1/2] libxl: add missing cleanup on error path in libxlDomainPMWakeup

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

 



On 12/7/18 7:45 PM, Marek Marczykowski-Górecki wrote:
Since domain was suspended before and on failed wakeup is destroyed,
send an event.
Also, add missing libxlDomainCleanup.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
---
  src/libxl/libxl_driver.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 5aa68a7c43..eb719345e8 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -1527,6 +1527,9 @@ libxlDomainPMWakeup(virDomainPtr dom, unsigned int flags)
      libxlDomainDestroyInternal(driver, vm);
      vm->def->id = -1;
      virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, VIR_DOMAIN_SHUTOFF_FAILED);
+    event = virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_STOPPED,
+                                              VIR_DOMAIN_EVENT_STOPPED_FAILED);
+    libxlDomainCleanup(driver, vm);
endjob:
      libxlDomainObjEndJob(driver, vm);


Reviewed-by: Jim Fehlig <jfehlig@xxxxxxxx>

Regards,
Jim

--
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]

  Powered by Linux