[libvirt] [PATCH 5/6] qemu: Disable errors in qemudShutdownVMDaemon

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

 



ShutdownVMDaemon is regularly used in cleanup paths, so let's make sure
it doesn't squash any original errors.

Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 91fdd3b..281c02d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -2174,6 +2174,10 @@ static void qemudShutdownVMDaemon(virConnectPtr conn,
 
     VIR_DEBUG(_("Shutting down VM '%s'\n"), vm->def->name);
 
+    /* This method is routinely used in clean up paths. Disable error
+     * reporting so we don't squash a legit error. */
+    virDisableErrors();
+
     if (driver->macFilter) {
         int i;
         virDomainDefPtr def = vm->def;
@@ -2256,6 +2260,8 @@ retry:
         vm->def->id = -1;
         vm->newDef = NULL;
     }
+
+    virEnableErrors();
 }
 
 
-- 
1.6.5.1

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