qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org,  prerna.saxena@nutanix.com,
	 dgilbert@redhat.com, pbonzini@redhat.com,  berrange@redhat.com,
	 armbru@redhat.com, eblake@redhat.com,
	 manish.mishra@nutanix.com, aravind.retnakaran@nutanix.com,
	 Het Gala <het.gala@nutanix.com>,  Peter Xu <peterx@redhat.com>,
	 Leonardo Bras <leobras@redhat.com>
Subject: Re: [PATCH v15 13/14] migration: Implement MigrateChannelList to hmp migration flow.
Date: Tue, 31 Oct 2023 18:42:43 +0100	[thread overview]
Message-ID: <87msvy4rjg.fsf@secure.mitica> (raw)
In-Reply-To: <20231023182053.8711-14-farosas@suse.de> (Fabiano Rosas's message of "Mon, 23 Oct 2023 15:20:52 -0300")

Fabiano Rosas <farosas@suse.de> wrote:
> From: Het Gala <het.gala@nutanix.com>
>
> Integrate MigrateChannelList with all transport backends
> (socket, exec and rdma) for both src and dest migration
> endpoints for hmp migration.
>
> Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
> Signed-off-by: Het Gala <het.gala@nutanix.com>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>


>      bool resume = qdict_get_try_bool(qdict, "resume", false);
>      const char *uri = qdict_get_str(qdict, "uri");
>      Error *err = NULL;
> +    MigrationChannelList *caps = NULL;
> +    g_autoptr(MigrationChannel) channel = NULL;
>  
> -    qmp_migrate(uri, false, NULL, !!blk, blk, !!inc, inc,
> +    if (!migrate_uri_parse(uri, &channel, &err)) {
> +        goto end;
> +    }
> +    QAPI_LIST_PREPEND(caps, g_steal_pointer(&channel));
> +
> +    qmp_migrate(NULL, true, caps, !!blk, blk, !!inc, inc,
>                   false, false, true, resume, &err);


> -    if (hmp_handle_error(mon, err)) {
> -        return;
> -    }

I think that dropping this chunk is wrong.  What assures that
qmp_migrate will not give an error?

> +    qapi_free_MigrationChannelList(caps);





>  
>      if (!detach) {
>          HMPMigrationStatus *status;
> @@ -766,6 +780,9 @@ void hmp_migrate(Monitor *mon, const QDict *qdict)
>                                            status);
>          timer_mod(status->timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME));
>      }
> +
> +end:
> +    hmp_handle_error(mon, err);


Oh, you put it here, but you enter in the detach case even if there is
one error.

I think it is easier to just repeat the hmp_mhandle_error() inplace of
the goto.

Later, Juan.



  reply	other threads:[~2023-10-31 17:43 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 18:20 [PATCH v15 00/14] migration: Modify 'migrate' and 'migrate-incoming' QAPI commands for migration Fabiano Rosas
2023-10-23 18:20 ` [PATCH v15 01/14] migration: New QAPI type 'MigrateAddress' Fabiano Rosas
2023-10-23 18:20 ` [PATCH v15 02/14] fixup! " Fabiano Rosas
2023-10-24  5:50   ` Markus Armbruster
2023-10-31 14:48   ` Juan Quintela
2023-10-23 18:20 ` [PATCH v15 03/14] migration: convert migration 'uri' into 'MigrateAddress' Fabiano Rosas
2023-10-31 15:02   ` Juan Quintela
2023-10-23 18:20 ` [PATCH v15 04/14] fixup! " Fabiano Rosas
2023-10-31 15:02   ` Juan Quintela
2023-10-23 18:20 ` [PATCH v15 05/14] migration: convert socket backend to accept MigrateAddress Fabiano Rosas
2023-10-31 15:12   ` Juan Quintela
2023-10-23 18:20 ` [PATCH v15 06/14] migration: convert rdma " Fabiano Rosas
2023-10-31 15:31   ` Juan Quintela
2023-10-23 18:20 ` [PATCH v15 07/14] migration: convert exec " Fabiano Rosas
2023-10-31 15:31   ` Juan Quintela
2023-10-23 18:20 ` [PATCH v15 08/14] migration: Convert the file backend to the new QAPI syntax Fabiano Rosas
2023-10-31 17:00   ` Juan Quintela
2023-10-23 18:20 ` [PATCH v15 09/14] migration: New migrate and migrate-incoming argument 'channels' Fabiano Rosas
2023-10-31 17:09   ` Juan Quintela
2023-10-23 18:20 ` [PATCH v15 10/14] fixup! " Fabiano Rosas
2023-10-24  5:50   ` Markus Armbruster
2023-10-31 17:17   ` Juan Quintela
2023-10-23 18:20 ` [PATCH v15 11/14] migration: modify migration_channels_and_uri_compatible() for new QAPI syntax Fabiano Rosas
2023-10-31 17:21   ` Juan Quintela
2023-10-23 18:20 ` [PATCH v15 12/14] migration: Implement MigrateChannelList to qmp migration flow Fabiano Rosas
2023-10-31 17:53   ` Juan Quintela
2023-11-03 10:43   ` Juan Quintela
2023-10-23 18:20 ` [PATCH v15 13/14] migration: Implement MigrateChannelList to hmp " Fabiano Rosas
2023-10-31 17:42   ` Juan Quintela [this message]
2023-10-31 18:51     ` Het Gala
2023-10-31 18:55       ` Juan Quintela
2023-10-31 19:09         ` Het Gala
2023-10-31 22:38           ` Juan Quintela
2023-10-31 18:57     ` Peter Xu
2023-10-23 18:20 ` [PATCH v15 14/14] migration: modify test_multifd_tcp_none() to use new QAPI syntax Fabiano Rosas
2023-10-31 17:29   ` 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=87msvy4rjg.fsf@secure.mitica \
    --to=quintela@redhat.com \
    --cc=aravind.retnakaran@nutanix.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=farosas@suse.de \
    --cc=het.gala@nutanix.com \
    --cc=leobras@redhat.com \
    --cc=manish.mishra@nutanix.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=prerna.saxena@nutanix.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).