From: Fabiano Rosas <farosas@suse.de>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, "Juan Quintela" <quintela@redhat.com>,
"Steve Sistare" <steven.sistare@oracle.com>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Leonardo Bras" <leobras@redhat.com>
Subject: Re: [PATCH 1/6] migration: Set migration status early in incoming side
Date: Fri, 30 Jun 2023 11:57:26 -0300 [thread overview]
Message-ID: <87a5whq9pl.fsf@suse.de> (raw)
In-Reply-To: <ZJ3ZCBwljzRP+Lqh@x1n>
Peter Xu <peterx@redhat.com> writes:
> On Wed, Jun 28, 2023 at 01:55:37PM -0300, Fabiano Rosas wrote:
>> We are sending a migration event of MIGRATION_STATUS_SETUP at
>> qemu_start_incoming_migration but never actually setting the state.
>>
>> This creates a window between qmp_migrate_incoming and
>> process_incoming_migration_co where the migration status is still
>> MIGRATION_STATUS_NONE. Calling query-migrate during this time will
>> return an empty response even though the incoming migration command
>> has already been issued.
>>
>> Commit 7cf1fe6d68 ("migration: Add migration events on target side")
>> has added support to the 'events' capability to the incoming part of
>> migration, but chose to send the SETUP event without setting the
>> state. I'm assuming this was a mistake.
>>
>> To avoid introducing a change in behavior, we need to keep sending the
>> SETUP event, even if the 'events' capability is not set. Add the
>> force-emit-setup-event migration property to enable it.
>
> This is so unfortunate... since qemu 2.4.....
>
> Does it mean that when cap-events is set we can send duplicated events?
>
Not with current code because this event was the only one sent directly
without setting the state first, so migrate_generate_event() never runs.
And not with this patch because I'm not sending the event if
migrate_events() is true because it will already be sent by
migrate_generate_event().
> The fix makes sense to me in general, butt I'm curious whether we can fix
> it without having a compat bit doing the wrong thing, even if having the
> risk of breaking someone, with the hope that the only thing he/she needs to
> do is to enable the cap-events if didn't. I'd consider that if e.g. as
> long as libvirt is fine. Does anyone know how libvirt handles this?
>
I agree that it would be cleaner for us to just break compatibility and
hope for the best. Any process waiting for the event would hang, but
simply enabling the capability would fix it.
I see libvirt knows about the 'events' capability but I couldn't
determine if it is enabled by default. I'll have to take a deeper look.
next prev parent reply other threads:[~2023-06-30 14:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 16:55 [PATCH 0/6] migration: Test the new "file:" migration Fabiano Rosas
2023-06-28 16:55 ` [PATCH 1/6] migration: Set migration status early in incoming side Fabiano Rosas
2023-06-29 19:18 ` Peter Xu
2023-06-30 14:57 ` Fabiano Rosas [this message]
2023-06-28 16:55 ` [PATCH 2/6] tests/qtest: migration: Expose migrate_set_capability Fabiano Rosas
2023-06-29 6:46 ` Thomas Huth
2023-06-28 16:55 ` [PATCH 3/6] tests/qtest: migration: Add migrate_incoming_qmp helper Fabiano Rosas
2023-06-29 21:16 ` Peter Xu
2023-06-30 14:57 ` Fabiano Rosas
2023-06-28 16:55 ` [PATCH 4/6] tests/qtest: migration: Use migrate_incoming_qmp where appropriate Fabiano Rosas
2023-06-28 16:55 ` [PATCH 5/6] tests/qtest: migration: Add support for negative testing of qmp_migrate Fabiano Rosas
2023-06-28 16:55 ` [PATCH 6/6] tests/qtest: migration-test: Add tests for file-based migration Fabiano Rosas
2023-06-29 21:36 ` Peter Xu
2023-06-30 15:05 ` Fabiano Rosas
2023-06-30 15:19 ` Steven Sistare
2023-06-30 16:25 ` Peter Xu
-- strict thread matches above, loose matches on Subject: below --
2023-06-26 18:22 [PATCH 0/6] migration: Test the new "file:" migration Fabiano Rosas
2023-06-26 18:22 ` [PATCH 1/6] migration: Set migration status early in incoming side Fabiano Rosas
2023-06-27 9:11 ` Juan Quintela
2023-06-27 12:36 ` Fabiano Rosas
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=87a5whq9pl.fsf@suse.de \
--to=farosas@suse.de \
--cc=berrange@redhat.com \
--cc=leobras@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=steven.sistare@oracle.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 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.