1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-04-01 20:05:19 +00:00

Introduce new VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR event

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.
This commit is contained in:
Michal Privoznik 2012-11-06 18:39:18 +01:00
parent 5f63a5cb42
commit adb29a8869
3 changed files with 5 additions and 1 deletions
examples/domain-events
events-c
events-python
include/libvirt

@ -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";
break;
}
break;
case VIR_DOMAIN_EVENT_RESUMED:

@ -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" ),
( "Unpaused", "Migrated", "Snapshot" ),
( "Shutdown", "Destroyed", "Crashed", "Migrated", "Saved", "Failed", "Snapshot"),
( "Finished", ),

@ -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 */
#ifdef VIR_ENUM_SENTINELS
VIR_DOMAIN_EVENT_SUSPENDED_LAST