[libvirt] [PATCH v2 1/2] Introduce new VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR event
Eric Blake
eblake at redhat.com
Tue Nov 6 18:58:44 UTC 2012
On 11/06/2012 11:23 AM, Michal Privoznik wrote:
> This is supposed to be thrown every time we need to pause domain
> because of API execution (e.g. qemuDomainSaveInternal) but fails
> to restore it back after. In this case, domain remains paused,
> however, none of existing reasons can fit this scenario.
> ---
> examples/domain-events/events-c/event-test.c | 3 +++
> examples/domain-events/events-python/event-test.py | 2 +-
> include/libvirt/libvirt.h.in | 1 +
> 3 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/examples/domain-events/events-c/event-test.c b/examples/domain-events/events-c/event-test.c
> index 39bea49..ee324b3 100644
> --- a/examples/domain-events/events-c/event-test.c
> +++ b/examples/domain-events/events-c/event-test.c
> @@ -149,6 +149,9 @@ static const char *eventDetailToString(int event, int detail) {
> case VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT:
> ret = "Snapshot";
> break;
> + case VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR:
> + ret = "Api error";
s/Api/API/
> +++ b/examples/domain-events/events-python/event-test.py
> @@ -445,7 +445,7 @@ def detailToString(event, detail):
> ( "Added", "Updated" ),
> ( "Removed", ),
> ( "Booted", "Migrated", "Restored", "Snapshot", "Wakeup" ),
> - ( "Paused", "Migrated", "IOError", "Watchdog", "Restored", "Snapshot" ),
> + ( "Paused", "Migrated", "IOError", "Watchdog", "Restored", "Snapshot", "Api error" ),
and again.
> ( "Unpaused", "Migrated", "Snapshot" ),
> ( "Shutdown", "Destroyed", "Crashed", "Migrated", "Saved", "Failed", "Snapshot"),
> ( "Finished", ),
> diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> index fe58c08..bf584a0 100644
> --- a/include/libvirt/libvirt.h.in
> +++ b/include/libvirt/libvirt.h.in
> @@ -3159,6 +3159,7 @@ typedef enum {
> VIR_DOMAIN_EVENT_SUSPENDED_WATCHDOG = 3, /* Suspended due to a watchdog firing */
> VIR_DOMAIN_EVENT_SUSPENDED_RESTORED = 4, /* Restored from paused state file */
> VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT = 5, /* Restored from paused snapshot */
> + VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR = 6, /* suspended after failure during libvirt API call */
ACK.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121106/f5434fa1/attachment-0001.sig>
More information about the libvir-list
mailing list