From: Markus Armbruster <armbru@redhat.com>
To: Het Gala <het.gala@nutanix.com>
Cc: qemu-devel@nongnu.org, prerna.saxena@nutanix.com,
quintela@redhat.com, dgilbert@redhat.com, pbonzini@redhat.com,
berrange@redhat.com, eblake@redhat.com,
manish.mishra@nutanix.com, aravind.retnakaran@nutanix.com
Subject: Re: [PATCH v6 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol.
Date: Wed, 05 Jul 2023 14:58:35 +0200 [thread overview]
Message-ID: <87jzvefrb8.fsf@pond.sub.org> (raw)
In-Reply-To: <696fa0ec-1c36-f245-80d1-e65fa60d5368@nutanix.com> (Het Gala's message of "Wed, 5 Jul 2023 18:19:20 +0530")
Het Gala <het.gala@nutanix.com> writes:
> On 05/07/23 4:51 pm, Markus Armbruster wrote:
>> Het Gala <het.gala@nutanix.com> writes:
>>
>>> This patch introduces well defined MigrateAddress struct and its related
>>> child objects.
>>>
>>> The existing argument of 'migrate' and 'migrate-incoming' QAPI - 'uri'
>>> is of string type. The current migration flow follows double encoding
>>> scheme for fetching migration parameters such as 'uri' and this is
>>> not an ideal design.
>>>
>>> Motive for intoducing struct level design is to prevent double encoding
>>> of QAPI arguments, as Qemu should be able to directly use the QAPI
>>> arguments without any level of encoding.
>>>
>>> Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
>>> Signed-off-by: Het Gala <het.gala@nutanix.com>
>>> Reviewed-by: Juan Quintela <quintela@redhat.com>
>>> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>>> ---
>>> qapi/migration.json | 45 +++++++++++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 45 insertions(+)
>>>
>>> diff --git a/qapi/migration.json b/qapi/migration.json
>>> index 179af0c4d8..e61d25eba2 100644
>>> --- a/qapi/migration.json
>>> +++ b/qapi/migration.json
>>> @@ -1407,6 +1407,51 @@
>>> ##
>>> { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
>>> +##
>>> +# @MigrationAddressType:
>>> +#
>>> +# The migration stream transport mechanisms.
>>> +#
>>> +# @socket: Migrate via socket.
>>> +#
>>> +# @exec: Direct the migration stream to another process.
>>> +#
>>> +# @rdma: Migrate via RDMA.
>>> +#
>>> +# Since 8.1
>>> +##
>>> +{ 'enum': 'MigrationAddressType',
>>> + 'data': ['socket', 'exec', 'rdma'] }
>>> +
>>> +##
>>> +# @MigrationExecCommand:
>>> +#
>>> +# @args: list of commands for migraton stream execution to a file.
>>
>> Typo: migration
>>
>>> +#
>>> +# Notes:
>>> +#
>>> +# 1. @args[0] needs to be the path to the new program.
>>
>> @args can't be a "list of commands", as we're spawning just one process.
>> So what is it?
>>
>> Digging through the code with the entire series applied... Member @args
>> is used in two places:
>>
>> 1. qemu_start_incoming_migration() passes it to
>> exec_start_incoming_migration(), which translates it into an array
>> and passes it to qio_channel_command_new_spawn().
>>
>> 2. qmp_migrate() passes it to exec_start_outgoing_migration(), which
>> does the same.
>>
>> qio_channel_command_new_spawn() passes it to
>> g_spawn_async_with_pipes(). A close read of the latter's documentation
>> leads me to:
>>
>> * args[0] is the excutable's file name. As usual, a relative name is
>> relative to the QEMU process's current working directory.
>>
>> * args[1..] are the arguments.
>>
>> Unlike POSIX interfaces like execv() and posix_spawn(), this doesn't
>> separate the executable's file name and 0-th argument.
>>
>> In short, the head of @args is the executable's filename, and the
>> remainder are the arguments. The fact that the the executable's
>> filename is passed as 0-th argument to the child process is detail.
>>
>> Perhaps this could do:
>>
>> ##
>> # @MigrationExecCommand:
>> #
>> # @args: command and arguments to execute.
>>
>> If we want more detail, perhaps:
>>
>> # @args: command (list head) and arguments (list tail) to execute.
>>
>> Not sure we need it. Thoughts?
>
> From a user prespective, I think defining that command / executable's filename is the list head would be good ? something like
>
> @args: command (list head) and arguments to execute.
Works for me.
[...]
next prev parent reply other threads:[~2023-07-05 12:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 10:15 [PATCH v6 0/9] migration: Modify 'migrate' and 'migrate-incoming' QAPI commands for migration Het Gala
2023-06-06 10:15 ` [PATCH v6 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol Het Gala
2023-06-13 5:28 ` Het Gala
2023-06-28 11:15 ` Het Gala
2023-07-05 11:21 ` Markus Armbruster
2023-07-05 12:49 ` Het Gala
2023-07-05 12:58 ` Markus Armbruster [this message]
2023-06-06 10:15 ` [PATCH v6 2/9] migration: convert uri parameter into 'MigrateAddress' struct Het Gala
2023-07-05 11:29 ` Markus Armbruster
2023-07-05 13:18 ` Het Gala
2023-06-06 10:15 ` [PATCH v6 3/9] migration: convert socket backend to accept MigrateAddress struct Het Gala
2023-06-06 10:15 ` [PATCH v6 4/9] migration: convert rdma " Het Gala
2023-06-06 10:15 ` [PATCH v6 5/9] migration: convert exec " Het Gala
2023-06-06 10:15 ` [PATCH v6 6/9] migration: modified migration QAPIs to accept 'channels' argument for migration Het Gala
2023-06-08 11:52 ` Het Gala
2023-06-06 10:15 ` [PATCH v6 7/9] migration: modify migration_channels_and_uri_compatible() to incorporate newer migration QAPI syntax Het Gala
2023-06-06 10:15 ` [PATCH v6 8/9] migration: Introduced MigrateChannelList struct to migration code flow Het Gala
2023-06-06 10:15 ` [PATCH v6 9/9] migration: adding test case for modified QAPI syntax 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=87jzvefrb8.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=aravind.retnakaran@nutanix.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=het.gala@nutanix.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 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.