]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: driver: Unset log file watcher after restoring a VM save file
authorPeter Krempa <pkrempa@redhat.com>
Fri, 3 Jun 2016 13:18:48 +0000 (15:18 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 8 Jun 2016 06:10:54 +0000 (08:10 +0200)
qemuProcessStart does not unset the infrastructure that retrieves errors
from the qemu log file in case of migration. As this wasn't handled
properly in qemuDomainSaveImageStartVM we kept the logging context/fd
open for the lifetime of the VM rather than closing it after it's not
needed.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1325080

src/qemu/qemu_driver.c

index 5e5e21abbf974ff57a58cbd534bf62519400eee3..fc43bcb239d480d5865e9161698ed8c2bb15cb2c 100644 (file)
@@ -6523,6 +6523,11 @@ qemuDomainSaveImageStartVM(virConnectPtr conn,
     if (!restored)
         goto cleanup;
 
+    /* qemuProcessStart doesn't unset the qemu error reporting infrastructure
+     * in case of migration (which is used in this case) so we need to reset it
+     * so that the handle to virtlogd is not held open unnecessarily */
+    qemuMonitorSetDomainLog(qemuDomainGetMonitor(vm), NULL, NULL, NULL);
+
     event = virDomainEventLifecycleNewFromObj(vm,
                                      VIR_DOMAIN_EVENT_STARTED,
                                      VIR_DOMAIN_EVENT_STARTED_RESTORED);