From: Het Gala <het.gala@nutanix.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, prerna.saxena@nutanix.com,
quintela@redhat.com, dgilbert@redhat.com, pbonzini@redhat.com,
armbru@redhat.com, eblake@redhat.com, manish.mishra@nutanix.com,
aravind.retnakaran@nutanix.com
Subject: Re: [PATCH v2 3/6] migration: HMP side changes for modified 'migrate' QAPI design
Date: Fri, 10 Feb 2023 12:14:21 +0530 [thread overview]
Message-ID: <e71fb95b-7fca-429a-872e-a8f48a3022d4@nutanix.com> (raw)
In-Reply-To: <Y+T8cGXoOvxYtipv@redhat.com>
On 09/02/23 7:30 pm, Daniel P. Berrangé wrote:
> On Thu, Feb 09, 2023 at 07:08:13PM +0530, Het Gala wrote:
>> On 09/02/23 5:35 pm, Daniel P. Berrangé wrote:
>>> On Wed, Feb 08, 2023 at 09:35:57AM +0000, Het Gala wrote:
>>>> hmp_migrate() stores modified QAPI 'migrate' arguments from qdict
>>>> into well defined MigrateChannel struct with help of
>>>> migrate_channel_from_qdict().
>>>> hmp_migrate() also accepts uri string as modified QAPI a 'migrate'
>>>> argument (for backward compatibility).
>>>>
>>>> Suggested-by: Daniel P. Berrange <berrange@redhat.com>
>>>> Suggested-by: Manish Mishra <manish.mishra@nutanix.com>
>>>> Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
>>>> Signed-off-by: Het Gala <het.gala@nutanix.com>
>>>> ---
>>>> migration/migration-hmp-cmds.c | 105 ++++++++++++++++++++++++++++++++-
>>>> migration/migration.c | 15 ++++-
>>>> 2 files changed, 116 insertions(+), 4 deletions(-)
>>>>
>
>>>> diff --git a/migration/migration.c b/migration/migration.c
>>>> index 7a14aa98d8..f6dd8dbb03 100644
>>>> --- a/migration/migration.c
>>>> +++ b/migration/migration.c
>>>> @@ -2463,9 +2463,9 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc,
>>>> return true;
>>>> }
>>>> -void qmp_migrate(const char *uri, bool has_blk, bool blk,
>>>> - bool has_inc, bool inc, bool has_detach, bool detach,
>>>> - bool has_resume, bool resume, Error **errp)
>>>> +void qmp_migrate(const char *uri, MigrateChannel *channel, bool has_blk,
>>>> + bool blk, bool has_inc, bool inc, bool has_detach,
>>>> + bool detach, bool has_resume, bool resume, Error **errp)
>>>> {
>>>> Error *local_err = NULL;
>>>> MigrationState *s = migrate_get_current();
>>>> @@ -2483,6 +2483,15 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
>>>> }
>>>> }
>>>> + /*
>>>> + * Having preliminary checks for uri and channel
>>>> + */
>>>> + if (uri && channel) {
>>>> + error_setg(errp, "uri and channels options should be"
>>> s/should be/are/, also best to quote parameter names, eg
>>>
>>> error_setg(errp,
>>> "'uri' and 'channels' options are mutually exclusive");
>> Ack.
>>>> + "mutually exclusive");
>>>> + return;
>>>> + }
>>>> +
>>> This change for qmp_migrate will need to be in patch 2.
>>>
>>> QEMU needs to compile & pass tests successfully after each individual
>>> patch. Currently it'll fail on patch 2, because the code generator
>>> wil emit the new qmp_migrate API declaration signature, but the change
>>> to the implementation signature is here in patch 3.
>> Yes Daniel, it will fail on patch 2. My understanding was that, even if
>> sometimes individual patches dont compile properly, the final series of all
>> the patches should be compiled properly. But I understand your point.
> No, unfortunately we require the strict behaviour, where *every* individual
> commit must compile and pass unit tests.
>
> The reason for this is that when chasing regression bugs, it is common for
> developers to use 'git bisect' to test compilation across a range of
> releases. 'git bisect' will land on completely arbitrary commits, so it
> is critical that every QEMU commit in the repo must compile and pass
> tests. It isn't sufficient for just the end of the series to compile.
>
>> I have a small concern here Daniel, if you could help me resolve it?
>> - There is a similar issue in patch 4. Where some function parameters are to
>> be changed. But that function responds to both source and destination side
>> changes. So though patch 4 contains all the source side changes, it does not
>> take into account destination side changes and it does not compile entirely.
>> And after destination side changes are inside patch 6, the dependencies are
>> resolved. How is it possible to compile individual patches in this case,
>> because then each patch should also have some significant meaning to all the
>> changes. So, in that way, source side changes in one commit and destination
>> side changes in another commit makes more sense right ?
> If there is code that is shared between src + dst, that may put constraints
> on how you split up the patches.
>
> Possibly a split like this may avoid having dependancy problems:
>
> * Patch intoduces the 'MigrateAddress' struct and related child
> objects, but *not* the MigrateChannel struct.
>
> * Patch introduces code that can parse a 'uri' and spit out a
> 'MigrateAddress' struct.
>
> * Patch converts internal socket backend to accept MigrateAddress,
> with 'migrate/migrate_incoming' impl convert from uri -> MigrateAddress
>
> * Patch converts internal exec backend to accept MigrateAddress
> with 'migrate/migrate_incoming' impl convert from uri -> MigrateAddress
>
> * Patch converts internal rdma backend to accept MigrateAddress
> with 'migrate/migrate_incoming' impl convert from uri -> MigrateAddress
>
> * Patch converts 'migrate' command to accept MigrateChannel param
> directly
>
> * Patch converts 'migrate_incoming' command to accept MigrateChannel
> param directly.
Thankyou Daniel, seems to be a great idea. I will try to restructure the
patches in a manner that every patch will compile and pass unit tests
individually.
> With regards,
> Daniel
Regards,
Het Gala
next prev parent reply other threads:[~2023-02-10 6:45 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 9:35 [PATCH v2 0/6] migration: Modified 'migrate' QAPI command for migration Het Gala
2023-02-08 9:35 ` [PATCH v2 1/6] migration: moved hmp_split_at_commma() helper func to qapi-util.c file Het Gala
2023-02-09 12:00 ` Markus Armbruster
2023-02-09 12:12 ` Juan Quintela
2023-02-09 13:58 ` Het Gala
2023-02-09 16:19 ` Markus Armbruster
2023-02-09 13:28 ` Het Gala
2023-02-09 12:02 ` Daniel P. Berrangé
2023-02-09 13:30 ` Het Gala
2023-02-08 9:35 ` [PATCH v2 2/6] migration: Updated QAPI format for 'migrate' qemu monitor command Het Gala
2023-02-08 20:17 ` Eric Blake
2023-02-09 7:57 ` Het Gala
2023-02-09 10:23 ` Daniel P. Berrangé
2023-02-09 13:00 ` Het Gala
2023-02-09 13:38 ` Daniel P. Berrangé
2023-02-10 6:37 ` Het Gala
2023-02-10 10:31 ` Markus Armbruster
2023-02-09 16:26 ` Markus Armbruster
2023-02-10 6:15 ` Het Gala
2023-02-09 10:29 ` Daniel P. Berrangé
2023-02-09 13:11 ` Het Gala
2023-02-09 13:22 ` Daniel P. Berrangé
2023-02-10 8:24 ` Het Gala
2023-02-10 7:24 ` QAPI unions as branches / unifying struct and union types (was: [PATCH v2 2/6] migration: Updated QAPI format for 'migrate' qemu monitor command) Markus Armbruster
2023-02-10 13:28 ` Het Gala
2023-02-14 10:16 ` QAPI unions as branches / unifying struct and union types Markus Armbruster
2023-02-17 11:18 ` Het Gala
2023-02-17 11:55 ` Daniel P. Berrangé
2023-02-21 9:17 ` Het Gala
2023-02-08 9:35 ` [PATCH v2 3/6] migration: HMP side changes for modified 'migrate' QAPI design Het Gala
2023-02-09 12:05 ` Daniel P. Berrangé
2023-02-09 13:38 ` Het Gala
2023-02-09 14:00 ` Daniel P. Berrangé
2023-02-10 6:44 ` Het Gala [this message]
2023-02-08 9:35 ` [PATCH v2 4/6] migration: Avoid multiple parsing of uri in migration code flow Het Gala
2023-02-09 10:40 ` Daniel P. Berrangé
2023-02-09 13:21 ` Het Gala
2023-02-09 12:09 ` Daniel P. Berrangé
2023-02-09 13:54 ` Het Gala
2023-02-09 14:06 ` Daniel P. Berrangé
2023-02-10 7:03 ` Het Gala
2023-02-08 9:35 ` [PATCH v2 5/6] migration: Modified 'migrate-incoming' QAPI and HMP side changes on the destination interface Het Gala
2023-02-08 20:19 ` Eric Blake
2023-02-09 7:59 ` Het Gala
2023-02-09 10:31 ` Daniel P. Berrangé
2023-02-09 13:14 ` Het Gala
2023-02-09 13:25 ` Daniel P. Berrangé
2023-02-08 9:36 ` [PATCH v2 6/6] migration: Established connection for listener sockets on the dest interface Het Gala
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=e71fb95b-7fca-429a-872e-a8f48a3022d4@nutanix.com \
--to=het.gala@nutanix.com \
--cc=aravind.retnakaran@nutanix.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=manish.mishra@nutanix.com \
--cc=pbonzini@redhat.com \
--cc=prerna.saxena@nutanix.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.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).