From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Steven Sistare <steven.sistare@oracle.com>
Cc: Peter Xu <peterx@redhat.com>,
qemu-devel@nongnu.org, Fabiano Rosas <farosas@suse.de>,
David Hildenbrand <david@redhat.com>,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
Eduardo Habkost <eduardo@habkost.net>,
Philippe Mathieu-Daude <philmd@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH V3 11/16] migration: cpr-transfer mode
Date: Wed, 20 Nov 2024 09:38:09 +0000 [thread overview]
Message-ID: <Zz2uAWLAhaf2TQ01@redhat.com> (raw)
In-Reply-To: <c56ffc81-b065-4dd0-ab06-eb79912dcaf7@oracle.com>
On Tue, Nov 19, 2024 at 03:32:55PM -0500, Steven Sistare wrote:
> On 11/19/2024 3:16 PM, Peter Xu wrote:
> > On Tue, Nov 19, 2024 at 02:50:40PM -0500, Steven Sistare wrote:
> > > On 11/14/2024 2:04 PM, Peter Xu wrote:
> > > > On Thu, Nov 14, 2024 at 01:36:00PM -0500, Steven Sistare wrote:
> > > > > On 11/13/2024 4:58 PM, Peter Xu wrote:
> > > > > > On Fri, Nov 01, 2024 at 06:47:50AM -0700, Steve Sistare wrote:
> > > > > > > Add the cpr-transfer migration mode. Usage:
> > > > > > > qemu-system-$arch -machine anon-alloc=memfd ...
> > > > > > >
> > > > > > > start new QEMU with "-incoming <uri-1> -cpr-uri <uri-2>"
> > > > > > >
> > > > > > > Issue commands to old QEMU:
> > > > > > > migrate_set_parameter mode cpr-transfer
> > > > > > > migrate_set_parameter cpr-uri <uri-2>
> > > > > > > migrate -d <uri-1>
> > > > > >
> > > > > > QMP command "migrate" already allows taking MigrationChannel lists, cpr can
> > > > > > be the 2nd supported channel besides "main".
> > > > > >
> > > > > > I apologize on only noticing this until now.. I wished the incoming side
> > > > > > can do the same already (which also takes 'MigrationChannel') if monitors
> > > > > > init can be moved earlier, and if precreate worked out. If not, we should
> > > > > > still consider doing that on source, because cpr-uri isn't usable on dest
> > > > > > anyway.. so they need to be treated separately even now.
> > > > > >
> > > > > > Then after we make the monitor code run earlier in the future we could
> > > > > > introduce that to incoming side too, obsoleting -cpr-uri there.
> > > > >
> > > > > I have already been shot down on precreate and monitors init, so we are
> > > > > left with specifying a "cpr" channel on the outgoing side, and -cpr-uri
> > > > > on the incoming side. That will confuse users, will require more implementation
> > > > > and specification work than you perhaps realize to explain this to users,
> > > >
> > > > What is the specification work? Can you elaborate?
> > > >
> > > > > and only gets us halfway to your desired end point of specifying everything
> > > > > using channels. I don't like that plan!
> > > > >
> > > > > If we ever get the ability to open the monitor early, then we can implement
> > > > > a complete and clean solution using channels and declare the other options
> > > > > obsolete.
> > > >
> > > > The sender side doesn't need to wait for destination side to be ready?
> > > > Dest side isn't a reason to me on how we should make sender side work if
> > > > they're totally separate anyway. Dest requires -cpr-uri because we don't
> > > > yet have a choice.
> > > >
> > > > Is the only concern about code changes? I'm expecting this change is far
> > > > less controversial comparing to many others in this series, even if I
> > > > confess that may still contain some diff. They should hopefully be
> > > > straightforward, unlike many of the changes elsewhere in the series.
> > > >
> > > > If you prefer not writting that patch, I am OK, and I can write one patch
> > > > on top of your series after it lands if that is OK for you. I still want to
> > > > have this there when release 10.0 if I didn't misunderstood anything, so
> > > > I'll be able to remove cpr-uri directly in that patch too.
> > >
> > > I made the changes:
> > > * implementation
> > > * documentation in CPR.rst and QAPI
> > > * convert sample code in CPR.rst, commit messages, and cover letter to QMP,
> > > because a channel cannot be specified using HMP.
> >
> > Yeah we can leave HMP as of now; it can easily be added on top with
> > existing helpers like migrate_uri_parse().
>
> This begs the question, should we allow channels to be specified in hmp migrate
> commands and for -incoming, in a very simple way? Like with a prefix naming
> the channel. And eliminate the -cpr-uri argument. Examples:
>
> (qemu) migrate -d main:tcp:0:44444,cpr:unix:cpr.sock
>
> qemu -incoming main:tcp:0:44444,cpr:unix:cpr.sock
> qemu -incoming main:defer,cpr:unix:cpr.sock
As a general rule, if you ever find yourself asking "should we add more
magic parsing logic" to the command line argv, the answer should always
be 'no'.
Any command line args where we need to have more expressive formatting
are getting converted to accept JSON syntax, backed by QAPI modelling.
We were anticipating that '-incoming' should ideally end up deprecated
except for the plain "defer" option, on the expectation that any non-
trivial use of migration needs HMP/QMP regardless. If there's a vaild
use case for something other than 'defer', then we need to QAPI-ify
-incoming with JSON syntax IMHO.
Yes, there's still the question of HMP, but personally I'm fine with
leaving feature gaps in HMP and expecting people to use QMP. HMP shares
all the same flaws as our old approach to the CLI, of needing to invent
arbitrary magic syntaxes which has proved to be an undesirble path to
take in general. I see HMP as being there for the 80% common / simple
cases, and if you need to go beyond that, then QMP is there for you.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2024-11-20 9:39 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 13:47 [PATCH V3 00/16] Live update: cpr-transfer Steve Sistare
2024-11-01 13:47 ` [PATCH V3 01/16] machine: anon-alloc option Steve Sistare
2024-11-01 14:06 ` Peter Xu
2024-11-04 10:39 ` David Hildenbrand
2024-11-04 10:45 ` David Hildenbrand
2024-11-04 17:38 ` Steven Sistare
2024-11-04 19:51 ` David Hildenbrand
2024-11-04 20:14 ` Peter Xu
2024-11-04 20:17 ` David Hildenbrand
2024-11-04 20:41 ` Peter Xu
2024-11-04 20:15 ` David Hildenbrand
2024-11-04 20:56 ` Steven Sistare
2024-11-04 21:36 ` David Hildenbrand
2024-11-06 20:12 ` Steven Sistare
2024-11-06 20:41 ` Peter Xu
2024-11-06 20:59 ` Steven Sistare
2024-11-06 21:21 ` Peter Xu
2024-11-07 14:03 ` Steven Sistare
2024-11-07 13:05 ` David Hildenbrand
2024-11-07 14:04 ` Steven Sistare
2024-11-07 16:19 ` David Hildenbrand
2024-11-07 18:13 ` Steven Sistare
2024-11-07 16:32 ` Peter Xu
2024-11-07 16:38 ` David Hildenbrand
2024-11-07 17:48 ` Peter Xu
2024-11-07 13:23 ` David Hildenbrand
2024-11-07 16:02 ` Steven Sistare
2024-11-07 16:26 ` David Hildenbrand
2024-11-07 16:40 ` Steven Sistare
2024-11-08 11:31 ` David Hildenbrand
2024-11-08 13:43 ` Peter Xu
2024-11-08 14:14 ` Steven Sistare
2024-11-08 14:32 ` Peter Xu
2024-11-08 14:18 ` David Hildenbrand
2024-11-08 15:01 ` Peter Xu
2024-11-08 13:56 ` Steven Sistare
2024-11-08 14:20 ` David Hildenbrand
2024-11-08 14:37 ` Steven Sistare
2024-11-08 14:54 ` David Hildenbrand
2024-11-08 15:07 ` Peter Xu
2024-11-08 15:09 ` David Hildenbrand
2024-11-08 15:15 ` David Hildenbrand
2024-11-01 13:47 ` [PATCH V3 02/16] migration: cpr-state Steve Sistare
2024-11-13 20:36 ` Peter Xu
2024-11-01 13:47 ` [PATCH V3 03/16] physmem: preserve ram blocks for cpr Steve Sistare
2024-11-01 13:47 ` [PATCH V3 04/16] hostmem-memfd: preserve " Steve Sistare
2024-11-01 13:47 ` [PATCH V3 05/16] migration: SCM_RIGHTS for QEMUFile Steve Sistare
2024-11-13 20:54 ` Peter Xu
2024-11-14 18:34 ` Steven Sistare
2024-11-01 13:47 ` [PATCH V3 06/16] migration: VMSTATE_FD Steve Sistare
2024-11-13 20:55 ` Peter Xu
2024-11-01 13:47 ` [PATCH V3 07/16] migration: cpr-transfer save and load Steve Sistare
2024-11-01 13:47 ` [PATCH V3 08/16] migration: cpr-uri parameter Steve Sistare
2024-11-01 13:47 ` [PATCH V3 09/16] migration: cpr-uri option Steve Sistare
2024-11-01 13:47 ` [PATCH V3 10/16] migration: split qmp_migrate Steve Sistare
2024-11-13 21:11 ` Peter Xu
2024-11-14 18:33 ` Steven Sistare
2024-11-01 13:47 ` [PATCH V3 11/16] migration: cpr-transfer mode Steve Sistare
2024-11-13 21:58 ` Peter Xu
2024-11-14 18:36 ` Steven Sistare
2024-11-14 19:04 ` Peter Xu
2024-11-19 19:50 ` Steven Sistare
2024-11-19 20:16 ` Peter Xu
2024-11-19 20:32 ` Steven Sistare
2024-11-19 20:51 ` Peter Xu
2024-11-19 21:03 ` Steven Sistare
2024-11-19 21:29 ` Peter Xu
2024-11-19 21:41 ` Steven Sistare
2024-11-19 21:48 ` Peter Xu
2024-11-19 21:51 ` Steven Sistare
2024-11-20 9:38 ` Daniel P. Berrangé [this message]
2024-11-20 16:12 ` Steven Sistare
2024-11-20 16:26 ` Daniel P. Berrangé
2024-11-01 13:47 ` [PATCH V3 12/16] tests/migration-test: memory_backend Steve Sistare
2024-11-13 22:19 ` Fabiano Rosas
2024-11-01 13:47 ` [PATCH V3 13/16] tests/qtest: defer connection Steve Sistare
2024-11-13 22:36 ` Fabiano Rosas
2024-11-14 18:45 ` Steven Sistare
2024-11-13 22:53 ` Peter Xu
2024-11-14 18:31 ` Steven Sistare
2024-11-01 13:47 ` [PATCH V3 14/16] tests/migration-test: " Steve Sistare
2024-11-14 12:46 ` Fabiano Rosas
2024-11-01 13:47 ` [PATCH V3 15/16] migration-test: cpr-transfer Steve Sistare
2024-11-01 13:47 ` [PATCH V3 16/16] migration: cpr-transfer documentation Steve Sistare
2024-11-13 22:02 ` Peter Xu
2024-11-14 18:31 ` Steven Sistare
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=Zz2uAWLAhaf2TQ01@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=david@redhat.com \
--cc=eduardo@habkost.net \
--cc=farosas@suse.de \
--cc=marcel.apfelbaum@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--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 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).