summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2011-05-29 20:21:53 +0800
committerDaniel Veillard <veillard@redhat.com>2011-05-29 20:21:53 +0800
commitd4bd086156663a972fcafc3b0aca857dddae1194 (patch)
tree7636e4fb45bc6a17a7070914b9c77c44e06d85ea
parent9c1f69c64ede809901f05073fdbf925078cf1550 (diff)
downloadlibvirt-python-split-d4bd086156663a972fcafc3b0aca857dddae1194.tar.gz
libvirt-python-split-d4bd086156663a972fcafc3b0aca857dddae1194.tar.xz
libvirt-python-split-d4bd086156663a972fcafc3b0aca857dddae1194.zip
Introduce a new event emitted when a virtualization failure occursv0.9.2CVE-2011-2178
This introduces a new domain VIR_DOMAIN_EVENT_ID_CONTROL_ERROR Which uses the existing generic callback typedef void (*virConnectDomainEventGenericCallback)(virConnectPtr conn, virDomainPtr dom, void *opaque); This event is intended to be emitted when there is a failure in some part of the domain virtualization system. Whether the domain continues to run/exist after the failure is an implementation detail specific to the hypervisor. The idea is that with some types of failure, hypervisors may prefer to leave the domain running in a "degraded" mode of operation. For example, if something goes wrong with the QEMU monitor, it is possible to leave the guest OS running quite happily. The mgmt app will simply loose the ability todo various tasks. The mgmt app can then choose how/when to deal with the failure that occured. * daemon/remote.c: Dispatch of new event * examples/domain-events/events-c/event-test.c: Demo catch of event * include/libvirt/libvirt.h.in: Define event ID and callback * src/conf/domain_event.c, src/conf/domain_event.h: Internal event handling * src/remote/remote_driver.c: Receipt of new event from daemon * src/remote/remote_protocol.x: Wire protocol for new event * src/remote_protocol-structs: add new event for checks
-rw-r--r--libvirt-override.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libvirt-override.c b/libvirt-override.c
index 8676aba..763df00 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -3480,6 +3480,9 @@ libvirt_virConnectDomainEventRegisterAny(ATTRIBUTE_UNUSED PyObject * self,
case VIR_DOMAIN_EVENT_ID_GRAPHICS:
cb = VIR_DOMAIN_EVENT_CALLBACK(libvirt_virConnectDomainEventGraphicsCallback);
break;
+ case VIR_DOMAIN_EVENT_ID_CONTROL_ERROR:
+ cb = VIR_DOMAIN_EVENT_CALLBACK(libvirt_virConnectDomainEventGenericCallback);
+ break;
}
if (!cb) {