]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Add support for an explicit watchdog event
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 18 Mar 2010 19:07:48 +0000 (19:07 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 26 Mar 2010 13:53:01 +0000 (13:53 +0000)
commitc5728cd618ba1e8da745baade7662db681fc3851
treec916aeeaf214784b24faae393a260956edfe80f7
parent32e6ac9c2601e19715d18f743cf805a3466d3385
Add support for an explicit watchdog event

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);

* daemon/remote.c: Dispatch watchdog events to client
* examples/domain-events/events-c/event-test.c: Watch for
  watchdog events
* include/libvirt/libvirt.h.in: Define new watchdg event ID
  and callback signature
* src/conf/domain_event.c, src/conf/domain_event.h,
  src/libvirt_private.syms: Extend API to handle watchdog events
* src/qemu/qemu_driver.c: Connect to the QEMU monitor event
  for watchdogs and emit a libvirt watchdog event
* src/remote/remote_driver.c: Receive and dispatch watchdog
  events to application
* src/remote/remote_protocol.x: Wire protocol definition for
  watchdog events
* src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
  src/qemu/qemu_monitor_json.c: Watch for WATCHDOG event
  from QEMU monitor
16 files changed:
daemon/remote.c
daemon/remote_dispatch_table.h
examples/domain-events/events-c/event-test.c
include/libvirt/libvirt.h.in
python/generator.py
src/conf/domain_event.c
src/conf/domain_event.h
src/libvirt_private.syms
src/qemu/qemu_driver.c
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c
src/remote/remote_driver.c
src/remote/remote_protocol.c
src/remote/remote_protocol.h
src/remote/remote_protocol.x