From: Peter Xu <peterx@redhat.com>
To: Juraj Marcin <jmarcin@redhat.com>
Cc: qemu-devel@nongnu.org,
"Dr. David Alan Gilbert" <dave@treblig.org>,
Jiri Denemark <jdenemar@redhat.com>,
Fabiano Rosas <farosas@suse.de>
Subject: Re: [PATCH v3 5/7] migration: Respect exit-on-error when migration fails before resuming
Date: Thu, 30 Oct 2025 18:49:27 -0400 [thread overview]
Message-ID: <aQPrd0giJxS6qz2i@x1.local> (raw)
In-Reply-To: <20251030214915.1411860-6-jmarcin@redhat.com>
On Thu, Oct 30, 2025 at 10:49:09PM +0100, Juraj Marcin wrote:
> From: Juraj Marcin <jmarcin@redhat.com>
>
> When exit-on-error was added to migration, it wasn't added to postcopy.
> Even though postcopy migration will usually pause and not fail, in cases
> it does unrecoverably fail before destination side has been started,
> exit-on-error will allow management to query the error.
>
> Signed-off-by: Juraj Marcin <jmarcin@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
> ---
> migration/postcopy-ram.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
> index 48cbb46c27..91431f02a4 100644
> --- a/migration/postcopy-ram.c
> +++ b/migration/postcopy-ram.c
> @@ -2080,11 +2080,16 @@ bool postcopy_is_paused(MigrationStatus status)
>
> static void postcopy_listen_thread_bh(void *opaque)
> {
> + MigrationState *s = migrate_get_current();
> MigrationIncomingState *mis = migration_incoming_get_current();
>
> migration_incoming_state_destroy();
>
> - if (mis->state == MIGRATION_STATUS_FAILED) {
> + if (mis->state == MIGRATION_STATUS_FAILED && mis->exit_on_error) {
> + WITH_QEMU_LOCK_GUARD(&s->error_mutex) {
> + error_report_err(s->error);
> + s->error = NULL;
> + }
> /*
> * If something went wrong then we have a bad state so exit;
> * we only could have gotten here if something failed before
> --
> 2.51.0
>
--
Peter Xu
next prev parent reply other threads:[~2025-10-30 22:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 21:49 [PATCH v3 0/7] migration: Introduce POSTCOPY_DEVICE state Juraj Marcin
2025-10-30 21:49 ` [PATCH v3 1/7] migration: Do not try to start VM if disk activation fails Juraj Marcin
2025-10-30 21:49 ` [PATCH v3 2/7] migration: Move postcopy_ram_listen_thread() to postcopy-ram.c Juraj Marcin
2025-10-30 22:28 ` Peter Xu
2025-10-30 21:49 ` [PATCH v3 3/7] migration: Introduce postcopy incoming setup and cleanup functions Juraj Marcin
2025-10-30 22:35 ` Peter Xu
2025-10-30 21:49 ` [PATCH v3 4/7] migration: Refactor all incoming cleanup info migration_incoming_destroy() Juraj Marcin
2025-10-30 22:49 ` Peter Xu
2025-10-31 11:03 ` Juraj Marcin
2025-10-31 16:29 ` Peter Xu
2025-10-31 17:01 ` Peter Xu
2025-10-30 21:49 ` [PATCH v3 5/7] migration: Respect exit-on-error when migration fails before resuming Juraj Marcin
2025-10-30 22:49 ` Peter Xu [this message]
2025-10-30 21:49 ` [PATCH v3 6/7] migration: Make postcopy listen thread joinable Juraj Marcin
2025-10-30 22:49 ` Peter Xu
2025-10-30 21:49 ` [PATCH v3 7/7] migration: Introduce POSTCOPY_DEVICE state Juraj Marcin
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=aQPrd0giJxS6qz2i@x1.local \
--to=peterx@redhat.com \
--cc=dave@treblig.org \
--cc=farosas@suse.de \
--cc=jdenemar@redhat.com \
--cc=jmarcin@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 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).