]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Add missing on_crash lifecycle type
authorJohn Ferlan <jferlan@redhat.com>
Mon, 29 Jun 2015 19:22:49 +0000 (15:22 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 30 Jun 2015 15:32:50 +0000 (11:32 -0400)
https://bugzilla.redhat.com/show_bug.cgi?id=1201760

When the domain "<on_crash>coredump-destroy</on_crash>" is set, the
domain wasn't being destroyed, rather it was being rebooted.

Add VIR_DOMAIN_LIFECYCLE_CRASH_COREDUMP_DESTROY to the list of
on_crash types that cause "-no-reboot" to be added to the qemu
command line.

src/qemu/qemu_command.c

index 443a7d7739a6823f01a7c42f3200359b1a638f9f..c8f8fe837416d3e2caa2babca6863663197fa717 100644 (file)
@@ -9381,7 +9381,8 @@ qemuBuildCommandLine(virConnectPtr conn,
         /* Only add -no-reboot option if each event destroys domain */
         if (def->onReboot == VIR_DOMAIN_LIFECYCLE_DESTROY &&
             def->onPoweroff == VIR_DOMAIN_LIFECYCLE_DESTROY &&
-            def->onCrash == VIR_DOMAIN_LIFECYCLE_CRASH_DESTROY) {
+            (def->onCrash == VIR_DOMAIN_LIFECYCLE_CRASH_DESTROY ||
+             def->onCrash == VIR_DOMAIN_LIFECYCLE_CRASH_COREDUMP_DESTROY)) {
             allowReboot = false;
             virCommandAddArg(cmd, "-no-reboot");
         }