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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]