[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 1/9] migration: introduced 'MigrateAddress' in QAPI for migrat
From: |
Het Gala |
Subject: |
[PATCH v6 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol. |
Date: |
Tue, 6 Jun 2023 10:15:49 +0000 |
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.
+#
+# Notes:
+#
+# 1. @args[0] needs to be the path to the new program.
+#
+# Since 8.1
+##
+{ 'struct': 'MigrationExecCommand',
+ 'data': {'args': [ 'str' ] } }
+
+##
+# @MigrationAddress:
+#
+# Migration endpoint configuration.
+#
+# Since 8.1
+##
+{ 'union': 'MigrationAddress',
+ 'base': { 'transport' : 'MigrationAddressType'},
+ 'discriminator': 'transport',
+ 'data': {
+ 'socket': 'SocketAddress',
+ 'exec': 'MigrationExecCommand',
+ 'rdma': 'InetSocketAddress' } }
+
##
# @migrate:
#
--
2.22.3
- [PATCH v6 0/9] migration: Modify 'migrate' and 'migrate-incoming' QAPI commands for migration, Het Gala, 2023/06/06
- [PATCH v6 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol.,
Het Gala <=
- [PATCH v6 2/9] migration: convert uri parameter into 'MigrateAddress' struct, Het Gala, 2023/06/06
- [PATCH v6 4/9] migration: convert rdma backend to accept MigrateAddress struct, Het Gala, 2023/06/06
- [PATCH v6 3/9] migration: convert socket backend to accept MigrateAddress struct, Het Gala, 2023/06/06
- [PATCH v6 5/9] migration: convert exec backend to accept MigrateAddress struct., Het Gala, 2023/06/06
- [PATCH v6 6/9] migration: modified migration QAPIs to accept 'channels' argument for migration, Het Gala, 2023/06/06
- [PATCH v6 9/9] migration: adding test case for modified QAPI syntax, Het Gala, 2023/06/06
- [PATCH v6 8/9] migration: Introduced MigrateChannelList struct to migration code flow., Het Gala, 2023/06/06