qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/5] QMP: Introduce MIGRATION events
Date: Tue, 25 May 2010 10:09:55 -0500	[thread overview]
Message-ID: <4BFBE843.5070202@codemonkey.ws> (raw)
In-Reply-To: <9b6575587d22a5c85ec536172810520ee3b945d5.1274796992.git.quintela@redhat.com>

On 05/25/2010 09:21 AM, Juan Quintela wrote:
> They are emitted when migration starts, ends, has a failure or is canceled.
>
> Signed-off-by: Juan Quintela<quintela@redhat.com>
> ---
>   QMP/qmp-events.txt |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
>   monitor.c          |   12 ++++++++++++
>   monitor.h          |    4 ++++
>   3 files changed, 66 insertions(+), 0 deletions(-)
>
> diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt
> index 01ec85f..93caa4d 100644
> --- a/QMP/qmp-events.txt
> +++ b/QMP/qmp-events.txt
> @@ -26,6 +26,56 @@ Example:
>   Note: If action is "stop", a STOP event will eventually follow the
>   BLOCK_IO_ERROR event.
>    


> +MIGRATION_CANCELED
> +------------------
> +
> +Emitted when migration is canceled.  This is emitted in the source.
> +Target will emit MIGRATION_FAILED (no way to differentiate a FAILED
> +and CANCELED migration for target).
>    

But the management tool is the one that cancels so surely, it knows why 
already.

> +Data: None
> +
> +Example:
> +
> +{ "event": "MIGRATION_CANCELED",
> +    "timestamp": {"seconds": 1274687575, "microseconds": 592483} }
> +
> +MIGRATION_ENDED
> +---------------
> +
> +Emitted when migration ends (both in source and target)
>    

A start event is going to be generated already, no?

> +Data: None
> +
> +Example:
> +
> +{ "event": "MIGRATION_ENDED",
> +    "timestamp": {"seconds": 1274687575, "microseconds": 592483} }
> +
> +MIGRATION_FAILED
> +----------------
> +
> +Emitted when migration fails (both is source and target).
> +
> +Data: None
>    

There should be some information about why it failed, no? Preferrably in 
a QError format.

> +Example:
> +
> +{ "event": "MIGRATION_FAILED",
> +    "timestamp": {"seconds": 1274687575, "microseconds": 592483} }
> +
> +MIGRATION_STARTED
> +-----------------
> +
> +Emitted when migration starts (both in source and target).
>    

I think this makes more sense as a MIGRATION_CONNECTED event.  It 
probably should carry peer information too.

Regards,

Anthony Liguori

> +Data: None
> +
> +Example:
> +
> +{ "event": "MIGRATION_STARTED",
> +    "timestamp": {"seconds": 1274687575, "microseconds": 592483} }
> +
>   RESET
>   -----
>
> diff --git a/monitor.c b/monitor.c
> index ad50f12..5158780 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -444,6 +444,18 @@ void monitor_protocol_event(MonitorEvent event, QObject *data)
>           case QEVENT_WATCHDOG:
>               event_name = "WATCHDOG";
>               break;
> +        case QEVENT_MIGRATION_STARTED:
> +            event_name = "MIGRATION_STARTED";
> +            break;
> +        case QEVENT_MIGRATION_ENDED:
> +            event_name = "MIGRATION_ENDED";
> +            break;
> +        case QEVENT_MIGRATION_FAILED:
> +            event_name = "MIGRATION_FAILED";
> +            break;
> +        case QEVENT_MIGRATION_CANCELED:
> +            event_name = "MIGRATION_CANCELED";
> +            break;
>           default:
>               abort();
>               break;
> diff --git a/monitor.h b/monitor.h
> index ea15469..34bcd38 100644
> --- a/monitor.h
> +++ b/monitor.h
> @@ -28,6 +28,10 @@ typedef enum MonitorEvent {
>       QEVENT_BLOCK_IO_ERROR,
>       QEVENT_RTC_CHANGE,
>       QEVENT_WATCHDOG,
> +    QEVENT_MIGRATION_STARTED,
> +    QEVENT_MIGRATION_ENDED,
> +    QEVENT_MIGRATION_FAILED,
> +    QEVENT_MIGRATION_CANCELED,
>       QEVENT_MAX,
>   } MonitorEvent;
>
>    

  reply	other threads:[~2010-05-25 15:10 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25 14:21 [Qemu-devel] [PATCH v2 0/5] Add QMP migration events Juan Quintela
2010-05-25 14:21 ` [Qemu-devel] [PATCH 1/5] Exit if incoming migration fails Juan Quintela
2010-05-25 18:01   ` Luiz Capitulino
2010-05-25 18:37     ` [Qemu-devel] " Juan Quintela
2010-05-25 18:52       ` Anthony Liguori
2010-05-25 14:21 ` [Qemu-devel] [PATCH 2/5] Factorize common migration incoming code Juan Quintela
2010-05-25 14:21 ` [Qemu-devel] [PATCH 3/5] QMP: Introduce MIGRATION events Juan Quintela
2010-05-25 15:09   ` Anthony Liguori [this message]
2010-05-25 15:35     ` [Qemu-devel] " Juan Quintela
2010-05-25 15:52       ` Daniel P. Berrange
2010-05-25 15:57       ` Anthony Liguori
2010-05-25 16:04         ` Juan Quintela
2010-05-25 16:10           ` Anthony Liguori
2010-05-25 18:13             ` Luiz Capitulino
2010-05-25 16:04         ` Daniel P. Berrange
2010-05-25 16:04         ` Juan Quintela
2010-05-25 16:25           ` Daniel P. Berrange
2010-05-25 16:33             ` Anthony Liguori
2010-05-25 16:43               ` Juan Quintela
2010-05-26 10:33                 ` Daniel P. Berrange
2010-05-26 14:54                   ` Anthony Liguori
2010-05-26 15:15                     ` Daniel P. Berrange
2010-05-26 16:55                       ` Anthony Liguori
2010-05-27 13:48                         ` Luiz Capitulino
2010-05-27 15:58                           ` Juan Quintela
2010-05-27 16:07                             ` Luiz Capitulino
2010-05-27 16:07                             ` Anthony Liguori
2010-05-26 10:16               ` Daniel P. Berrange
2010-05-25 18:21       ` Luiz Capitulino
2010-05-25 18:38         ` Juan Quintela
2010-05-25 15:48     ` [Qemu-devel] " Daniel P. Berrange
2010-05-25 18:31   ` Luiz Capitulino
2010-05-25 18:51     ` Anthony Liguori
2010-05-26 13:14       ` Luiz Capitulino
2010-05-25 14:21 ` [Qemu-devel] [PATCH 4/5] QMP: Emit migration events on incoming migration Juan Quintela
2010-05-25 14:21 ` [Qemu-devel] [PATCH 5/5] QMP: Emit migration events on outgoing migration Juan Quintela
  -- strict thread matches above, loose matches on Subject: below --
2010-05-24  8:25 [Qemu-devel] [PATCH 0/5] Add QMP migration events Juan Quintela
2010-05-24  8:25 ` [Qemu-devel] [PATCH 3/5] QMP: Introduce MIGRATION events Juan Quintela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BFBE843.5070202@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).