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

Re: [libvirt] [PATCH v2 1/2] Introduce new VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR event



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 redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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