From: Juan Quintela <quintela@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: amit.shah@redhat.com, jdenemar@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] migration: Add migration events on target side
Date: Thu, 21 May 2015 11:57:03 +0200 [thread overview]
Message-ID: <87vbfm1ceo.fsf@neno.neno> (raw)
In-Reply-To: <555CB1E3.7020904@redhat.com> (Eric Blake's message of "Wed, 20 May 2015 10:10:11 -0600")
Eric Blake <eblake@redhat.com> wrote:
> On 05/20/2015 09:35 AM, Juan Quintela wrote:
>> We reuse the migration events from the source side, sending them on the
>> appropiate place.
>
> s/appropiate/appropriate/
>
>>
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>> migration/migration.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>
>> @@ -116,14 +117,17 @@ static void process_incoming_migration_co(void *opaque)
>> Error *local_err = NULL;
>> int ret;
>>
>> + qapi_event_send_migration(MIGRATION_STATUS_ACTIVE, &error_abort);
>> ret = qemu_loadvm_state(f);
>> qemu_fclose(f);
>> free_xbzrle_decoded_buf();
>> if (ret < 0) {
>> + qapi_event_send_migration(MIGRATION_STATUS_FAILED, &error_abort);
>> error_report("load of migration failed: %s", strerror(-ret));
>> migrate_decompress_threads_join();
>> exit(EXIT_FAILURE);
>
> Does qapi_event_send_* send an event right away, or merely just queue
> things up to be sent at a safe point later in the overall event loop?
> Or put another way, could the early exit() here prevent the actual error
> from being delivered, because we don't return control to the event loop
> to actually flush the pending event queue?
Too depth for me.
>
> But whether or not we have a design issue on the failure path, at least
> something got printed via error_report, and the real benefit of this
> patch is the event on success; so I'm fine with giving this patch:
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
Thanks
Once that we are here
@@ -89,6 +89,7 @@ void qemu_start_incoming_migration(const char *uri, Error **errp)
{
const char *p;
+ qapi_event_send_migration(MIGRATION_STATUS_SETUP, &error_abort);
if (!strcmp(uri, "defer")) {
deferred_incoming_migration(errp);
} else if (strstart(uri, "tcp:", &p)) {
I am not able to see this event at all. Not that it should matter for
destination. My guess is that it happens too early for qapi, qmp or
whatever handles events is ready to consume them. Any good idea?
Notice that in the big scheme of things, on destination, this event
should be very important/useful anyways.
Thanks again, Juan.
next prev parent reply other threads:[~2015-05-21 9:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 15:35 [Qemu-devel] [PATCH v4 0/3] Migration Events Juan Quintela
2015-05-20 15:35 ` [Qemu-devel] [PATCH 1/3] migration: Remove duplicated assignement of SETUP status Juan Quintela
2015-05-20 15:58 ` Eric Blake
2015-05-20 16:03 ` John Snow
2015-06-03 9:14 ` Juan Quintela
2015-05-20 15:35 ` [Qemu-devel] [PATCH 2/3] migration: create migration event Juan Quintela
2015-05-20 16:02 ` Eric Blake
2015-05-21 9:49 ` Juan Quintela
2015-06-17 0:20 ` Juan Quintela
2015-05-29 11:45 ` Jiri Denemark
2015-06-17 0:12 ` Juan Quintela
2015-05-20 15:35 ` [Qemu-devel] [PATCH 3/3] migration: Add migration events on target side Juan Quintela
2015-05-20 16:10 ` Eric Blake
2015-05-21 9:57 ` Juan Quintela [this message]
2015-06-02 12:44 ` [Qemu-devel] [PATCH v4 0/3] Migration Events Jiri Denemark
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=87vbfm1ceo.fsf@neno.neno \
--to=quintela@redhat.com \
--cc=amit.shah@redhat.com \
--cc=eblake@redhat.com \
--cc=jdenemar@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.