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

Re: [libvirt] [PATCH 11/13] Add support for an explicit watchdog event



On Fri, Mar 19, 2010 at 03:38:59PM +0000, Daniel P. Berrange wrote:
> This introduces a new event type
> 
>    VIR_DOMAIN_EVENT_ID_WATCHDOG
> 
> This event includes the action that is about to be taken
> as a result of the watchdog triggering
> 
>  typedef enum {
>      VIR_DOMAIN_EVENT_WATCHDOG_NONE = 0,
>      VIR_DOMAIN_EVENT_WATCHDOG_PAUSE,
>      VIR_DOMAIN_EVENT_WATCHDOG_RESET,
>      VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF,
>      VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN,
>      VIR_DOMAIN_EVENT_WATCHDOG_DEBUG,
>  } virDomainEventWatchdogAction;
> 
> Thus there is a new callback definition for this event type
> 
>  typedef void (*virConnectDomainEventWatchdogCallback)(virConnectPtr conn,
>                                                        virDomainPtr dom,
>                                                        int action,
>                                                        void *opaque);
[...]
> diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> index edb0a6e..7bee89c 100644
> --- a/include/libvirt/libvirt.h.in
> +++ b/include/libvirt/libvirt.h.in
> @@ -1846,6 +1846,18 @@ typedef void (*virConnectDomainEventRTCChangeCallback)(virConnectPtr conn,
>                                                         virDomainPtr dom,
>                                                         long long utcoffset,
>                                                         void *opaque);
> +typedef enum {
> +    VIR_DOMAIN_EVENT_WATCHDOG_NONE = 0,
> +    VIR_DOMAIN_EVENT_WATCHDOG_PAUSE,
> +    VIR_DOMAIN_EVENT_WATCHDOG_RESET,
> +    VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF,
> +    VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN,
> +    VIR_DOMAIN_EVENT_WATCHDOG_DEBUG,
> +} virDomainEventWatchdogAction;

Hum, what is NONE for ? Sounds more confusing than anything else to me.
Also a short description would be useful, for example is the watchdog
pause an user requested pause ? And what does the debug carries ?

> +typedef void (*virConnectDomainEventWatchdogCallback)(virConnectPtr conn,
> +                                                      virDomainPtr dom,
> +                                                      int action,
> +                                                      void *opaque);
>  

[...]

ACK, but we really to provide the semantic for PAUSE and DEBUG at the
API level not just wire the underlying QEMU events.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


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