migration: Revert mapped-ram multifd support to fd: URI

This reverts commit decdc76772 in full
and also the relevant migration-tests from
7a09f09283.

After the addition of the new QAPI-based migration address API in 8.2
we've been converting an "fd:" URI into a SocketAddress, missing the
fact that the "fd:" syntax could also be used for a plain file instead
of a socket. This is a problem because the SocketAddress is part of
the API, so we're effectively asking users to create a "socket"
channel to pass in a plain file.

The easiest way to fix this situation is to deprecate the usage of
both SocketAddress and "fd:" when used with a plain file for
migration. Since this has been possible since 8.2, we can wait until
9.1 to deprecate it.

For 9.0, however, we should avoid adding further support to migration
to a plain file using the old "fd:" syntax or the new SocketAddress
API, and instead require the usage of either the old-style "file:" URI
or the FileMigrationArgs::filename field of the new API with the
"/dev/fdset/NN" syntax, both of which are already supported.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240319210941.1907-1-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
Fabiano Rosas 2024-03-19 18:09:41 -03:00 committed by Peter Xu
parent 853546f812
commit bd4480b0d0
6 changed files with 8 additions and 127 deletions

View file

@ -2536,13 +2536,6 @@ static void *migrate_precopy_fd_file_start(QTestState *from, QTestState *to)
return NULL;
}
static void *migrate_fd_file_mapped_ram_start(QTestState *from, QTestState *to)
{
migrate_mapped_ram_start(from, to);
return migrate_precopy_fd_file_start(from, to);
}
static void test_migrate_precopy_fd_file(void)
{
MigrateCommon args = {
@ -2553,36 +2546,6 @@ static void test_migrate_precopy_fd_file(void)
};
test_file_common(&args, true);
}
static void test_migrate_precopy_fd_file_mapped_ram(void)
{
MigrateCommon args = {
.listen_uri = "defer",
.connect_uri = "fd:fd-mig",
.start_hook = migrate_fd_file_mapped_ram_start,
.finish_hook = test_migrate_fd_finish_hook
};
test_file_common(&args, true);
}
static void *migrate_multifd_fd_mapped_ram_start(QTestState *from,
QTestState *to)
{
migrate_multifd_mapped_ram_start(from, to);
return migrate_precopy_fd_file_start(from, to);
}
static void test_multifd_fd_mapped_ram(void)
{
MigrateCommon args = {
.connect_uri = "fd:fd-mig",
.listen_uri = "defer",
.start_hook = migrate_multifd_fd_mapped_ram_start,
.finish_hook = test_migrate_fd_finish_hook
};
test_file_common(&args, true);
}
#endif /* _WIN32 */
static void do_test_validate_uuid(MigrateStart *args, bool should_fail)
@ -3687,10 +3650,6 @@ int main(int argc, char **argv)
test_multifd_file_mapped_ram);
migration_test_add("/migration/multifd/file/mapped-ram/live",
test_multifd_file_mapped_ram_live);
#ifndef _WIN32
migration_test_add("/migration/multifd/fd/mapped-ram",
test_multifd_fd_mapped_ram);
#endif
#ifdef CONFIG_GNUTLS
migration_test_add("/migration/precopy/unix/tls/psk",
@ -3753,8 +3712,6 @@ int main(int argc, char **argv)
test_migrate_precopy_fd_socket);
migration_test_add("/migration/precopy/fd/file",
test_migrate_precopy_fd_file);
migration_test_add("/migration/precopy/fd/file/mapped-ram",
test_migrate_precopy_fd_file_mapped_ram);
#endif
migration_test_add("/migration/validate_uuid", test_validate_uuid);
migration_test_add("/migration/validate_uuid_error",