]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Destroy domain on decompression binary error
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 28 Jan 2013 14:13:27 +0000 (15:13 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 29 Jan 2013 08:51:47 +0000 (09:51 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=894723

Currently, if qemuProcessStart() succeeds, but it's decompression
binary that returns nonzero status, we don't kill the qemu process,
but remove it from internal domain list, leaving the qemu process
hanging around totally uncontrolled.

src/qemu/qemu_driver.c

index 13bf8542283f37183a41a29fcfed3271dab824d6..812bf95ee85b9422ef712540dedd885caaa06cc8 100644 (file)
@@ -4922,8 +4922,10 @@ qemuDomainSaveImageStartVM(virConnectPtr conn,
             VIR_FORCE_CLOSE(*fd);
         }
 
-        if (virCommandWait(cmd, NULL) < 0)
+        if (virCommandWait(cmd, NULL) < 0) {
+            qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED, 0);
             ret = -1;
+        }
     }
     VIR_FORCE_CLOSE(intermediatefd);