[libvirt] [PATCH v4 1/5] libvirt: Define domain crash event types

chenfan chen.fan.fnst at cn.fujitsu.com
Wed Jun 5 09:27:32 UTC 2013


On Wed, 2013-06-05 at 10:49 +0200, Daniel Hansel wrote:
> Applied and tested successfully on s390x platform (as expected by me).
> 
> Eric mentioned already the few points that should be corrected (indentation of comments).
> 
It's right.

> 
> Mit freundlichen Grüßen / Kind regards
> Daniel Hansel
> 
> IBM Deutschland Research & Development GmbH
> Vorsitzende des Aufsichtsrats: Martina Koederitz
> Geschäftsführung: Dirk Wittkopp
> Sitz der Gesellschaft: Böblingen
> Registergericht: Amtsgericht Stuttgart, HRB 243294
> 
> On 05.06.2013 05:03, Eric Blake wrote:
> > On 06/02/2013 09:58 PM, Chen Fan wrote:
> >> This patch introduces domain crashed types and crashed reasons which
> >> will be used while guest panicked.
> >> ---
> >>   examples/domain-events/events-c/event-test.c | 10 ++++++++++
> >>   include/libvirt/libvirt.h.in                 | 16 ++++++++++++++++
> >>   src/conf/domain_conf.c                       | 12 ++++++++----
> >>   3 files changed, 34 insertions(+), 4 deletions(-)
> >>
> >
> >> +++ b/include/libvirt/libvirt.h.in
> >> @@ -155,6 +155,7 @@ typedef enum {
> >>       VIR_DOMAIN_RUNNING_SAVE_CANCELED = 7,   /* returned from failed save process */
> >>       VIR_DOMAIN_RUNNING_WAKEUP = 8,          /* returned from pmsuspended due to
> >>                                                  wakeup event */
> >> +    VIR_DOMAIN_RUNNING_CRASHED = 9,          /* resumed from crashed */
> >
> > Indentation looks odd, but that's a trivial fix.
> >
> >
> >> @@ -212,6 +215,7 @@ typedef enum {
> >>
> >>   typedef enum {
> >>       VIR_DOMAIN_CRASHED_UNKNOWN = 0,     /* crashed for unknown reason */
> >> +    VIR_DOMAIN_CRASHED_PANICKED = 1,     /* domain panicked */
> >
> > and again
> >
> >
> >> +++ b/src/conf/domain_conf.c
> >> @@ -642,7 +642,8 @@ VIR_ENUM_IMPL(virDomainRunningReason, VIR_DOMAIN_RUNNING_LAST,
> >>                 "unpaused",
> >>                 "migration canceled",
> >>                 "save canceled",
> >> -              "wakeup")
> >> +              "wakeup",
> >> +              "from crashed")
> >
> > Might be better as merely "crashed"
> >
> >>
> >>   VIR_ENUM_IMPL(virDomainBlockedReason, VIR_DOMAIN_BLOCKED_LAST,
> >>                 "unknown")
> >> @@ -657,11 +658,13 @@ VIR_ENUM_IMPL(virDomainPausedReason, VIR_DOMAIN_PAUSED_LAST,
> >>                 "watchdog",
> >>                 "from snapshot",
> >>                 "shutdown",
> >> -              "snapshot")
> >> +              "snapshot",
> >> +              "guest panicked")
> >
> > Might be better as merely "panicked"
> >
> > Overall, looks like a reasonable set of additions in isolation, but I'm
> > still trying to figure out if support for xen panic detection already
> > had existing events that we should be reusing, instead of adding new
> > events just for qemu.
> >
> >
> >
> > --
> > libvir-list mailing list
> > libvir-list at redhat.com
> > https://www.redhat.com/mailman/listinfo/libvir-list
> >
> 






More information about the libvir-list mailing list