On 05/27/2013 10:41 AM, Chen Fan wrote:
From: chenfan <chen.fan.f...@cn.fujitsu.com>

This patch implements qemu_driver supporting guest panicked, modified the 
'on_crash' default value to 'preserve'.
It's not good to change the default behavior, if someone wants
preserve, make them specify it in the XML.
---
  examples/domain-events/events-c/event-test.c | 10 +++
  include/libvirt/libvirt.h.in                 | 16 +++++
  src/conf/domain_conf.c                       | 14 ++--
  src/qemu/qemu_monitor.c                      | 14 +++-
  src/qemu/qemu_monitor.h                      |  5 ++
  src/qemu/qemu_monitor_json.c                 |  7 ++
  src/qemu/qemu_process.c                      | 99 +++++++++++++++++++++++++++-
  tools/virsh-domain-monitor.c                 |  8 +++
  8 files changed, 166 insertions(+), 7 deletions(-)

not an issue, since it's a fairly small patch, but one could imagine to
split it up into a 3-part series: general libvirt, qemu and virsh.
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
@@ -10943,7 +10947,7 @@ virDomainDefParseXML(xmlDocPtr xml,
      if (virDomainEventActionParseXML(ctxt, "on_crash",
                                       "string(./on_crash[1])",
                                       &def->onCrash,
-                                     VIR_DOMAIN_LIFECYCLE_CRASH_DESTROY,
+                                     VIR_DOMAIN_LIFECYCLE_CRASH_PRESERVE,
                                       virDomainLifecycleCrashTypeFromString) < 
0)
          goto error;

see above, it's not good to change defaults, plus make check fails
with this hunk applied.

Other than that looks good to me (Tested on s390x with destroy, reboot
and preserve). Looking forward to see this in libvirt.

--

Mit freundlichen Grüßen/Kind Regards
   Viktor Mihajlovski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to