migration: feature removals for 11.0
v2 cover migration: feature removals for 11.0
v2:
- Added R-bs
- Updated description for removing zero-blocks [Markus]
- Squashed the "fd: to file" test removal into the 2nd patch
- I dropped the COLO patch, I have a local patch to remove colo migration completely, but looks like we won't do it.. Let's leave it for later but do the rest first
This series removes two deprecated features for 11.0.
Please review, thanks.
Peter Xu (2):
migration: Remove zero-blocks capability
migration: Remove fd: support on files
docs/about/deprecated.rst | 20 ------------- docs/about/removed-features.rst | 16 +++++++++++ qapi/migration.json | 12 -------- migration/fd.c | 11 ++++--- migration/options.c | 5 ---- tests/qtest/migration/precopy-tests.c | 41 --------------------------- 6 files changed, 23 insertions(+), 82 deletions(-)
Signature · 1 line
2.50.1
PATCH v2 1/2 migration: Remove zero-blocks capability
It was declared deprecated since 9.2.
--- docs/about/deprecated.rst | 6 ------ docs/about/removed-features.rst | 7 +++++++ qapi/migration.json | 12 ------------ migration/options.c | 5 ----- 4 files changed, 7 insertions(+), 23 deletions(-)
docs/about/deprecated.rst +0 -6
@@ -574,9 +574,3 @@ usage of providing a file descriptor to a plain file has been deprecated in favor of explicitly using the ``file:`` URI with the file descriptor being passed as an ``fdset``. Refer to the ``add-fd`` command documentation for details on the ``fdset`` usage. - -``zero-blocks`` capability (since 9.2) -'''''''''''''''''''''''''''''''''''''' - -The ``zero-blocks`` capability was part of the block migration which -doesn't exist anymore since it was removed in QEMU v9.1.
docs/about/removed-features.rst +7 -0
@@ -717,6 +717,13 @@ Block migration has been removed. For a replacement, see "QMP invocation for live storage migration with ``blockdev-mirror`` + NBD" in docs/interop/live-block-operations.rst. +``migrate-set-capabilities`` ``zero-blocks`` option (removed in 11.0) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +The ``zero-blocks`` capability was accidentally left behind when +block migration capability got removed in 9.1. Removed with no +replacement. + ``migrate-set-parameter`` ``compress-level`` option (removed in 9.1) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
qapi/migration.json +0 -12
@@ -440,13 +440,6 @@ # footprint is mlock()'d on demand or all at once. Refer to # docs/rdma.txt for usage. Disabled by default. (since 2.0) # -# @zero-blocks: During storage migration encode blocks of zeroes -# efficiently. This essentially saves 1MB of zeroes per block on -# the wire. Enabling requires source and target VM to support -# this feature. To enable it is sufficient to enable the -# capability on the source VM. The feature is disabled by -# default. (since 1.6) -# # @events: generate events for each migration state change (since 2.4) # # @auto-converge: If enabled, QEMU will automatically throttle down
@@ -531,14 +524,10 @@ # # @unstable: Members @x-colo and @x-ignore-shared are experimental. # -# @deprecated: Member @zero-blocks is deprecated as being part of -# block migration which was already removed. -# # Since: 1.2 ## { 'enum': 'MigrationCapability', 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', - { 'name': 'zero-blocks', 'features': [ 'deprecated' ] }, 'events', 'postcopy-ram', { 'name': 'x-colo', 'features': [ 'unstable' ] }, 'release-ram',
@@ -595,7 +584,6 @@ # {"state": false, "capability": "xbzrle"}, # {"state": false, "capability": "rdma-pin-all"}, # {"state": false, "capability": "auto-converge"}, -# {"state": false, "capability": "zero-blocks"}, # {"state": true, "capability": "events"}, # {"state": false, "capability": "postcopy-ram"}, # {"state": false, "capability": "x-colo"}
migration/options.c +0 -5
@@ -188,7 +188,6 @@ const Property migration_properties[] = {DEFINE_PROP_MIG_CAP ("x-xbzrle" ,MIGRATION_CAPABILITY_XBZRLE ),DEFINE_PROP_MIG_CAP ("x-rdma-pin-all" ,MIGRATION_CAPABILITY_RDMA_PIN_ALL ),DEFINE_PROP_MIG_CAP ("x-auto-converge" ,MIGRATION_CAPABILITY_AUTO_CONVERGE ), -DEFINE_PROP_MIG_CAP ("x-zero-blocks" ,MIGRATION_CAPABILITY_ZERO_BLOCKS ),DEFINE_PROP_MIG_CAP ("x-events" ,MIGRATION_CAPABILITY_EVENTS ),DEFINE_PROP_MIG_CAP ("x-postcopy-ram" ,MIGRATION_CAPABILITY_POSTCOPY_RAM ), DEFINE_PROP_MIG_CAP("x-postcopy-preempt",
@@ -576,10 +575,6 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp)ERRP_GUARD ();MigrationIncomingState *mis =migration_incoming_get_current (); -if (new_caps[MIGRATION_CAPABILITY_ZERO_BLOCKS ]) { -warn_report ("zero-blocks capability is deprecated" ); - } -#ifndef CONFIG_REPLICATION if (new_caps[MIGRATION_CAPABILITY_X_COLO ]) { error_setg(errp, "QEMU compiled without replication module"
Signature · 1 line
2.50.1
Re: [PATCH v2 1/2] migration: Remove zero-blocks capability
Quoted 4 lines · Peter Xu
It was declared deprecated since 9.2.
Reviewed-by Fabiano Rosas <[email protected]>Signed-off-by Peter Xu <[email protected]>
PATCH v2 2/2 migration: Remove fd: support on files
In reply to Peter XuThis feature was deprecated in 9.1. Remove it in this release (11.0).
We also need to remove one unit test (/migration/precopy/fd/file) that covers the fd: file migration, because it'll stop working now.
--- docs/about/deprecated.rst | 14 --------- docs/about/removed-features.rst | 9 ++++++ migration/fd.c | 11 ++++--- tests/qtest/migration/precopy-tests.c | 41 --------------------------- 4 files changed, 16 insertions(+), 59 deletions(-)
docs/about/deprecated.rst +0 -14
@@ -560,17 +560,3 @@ If the user requests a modern x86 CPU model (i.e. not one of ``486``, ``athlon``, ``kvm32``, ``pentium``, ``pentium2``, ``pentium3``or ``qemu32``) a warning will be displayed until a future QEMU version when such CPUs will be rejected. - -Migration ---------- - -``fd:`` URI when used for file migration (since 9.1) -'''''''''''''''''''''''''''''''''''''''''''''''''''' - -The ``fd:`` URI can currently provide a file descriptor that -references either a socket or a plain file. These are two different -types of migration. In order to reduce ambiguity, the ``fd:`` URI -usage of providing a file descriptor to a plain file has been -deprecated in favor of explicitly using the ``file:`` URI with the -file descriptor being passed as an ``fdset``. Refer to the ``add-fd`` -command documentation for details on the ``fdset`` usage.
docs/about/removed-features.rst +9 -0
@@ -710,6 +710,15 @@ Use blockdev-mirror with NBD instead. See "QMP invocation for live storage migration with ``blockdev-mirror`` + NBD" in docs/interop/live-block-operations.rst for a detailed explanation. +``migrate`` command with file-based ``fd:`` URI (removed in 11.0) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +In order to reduce ambiguity, the ``fd:`` URI usage of providing a +file descriptor to a plain file has been removed in favor of +explicitly using the ``file:`` URI with the file descriptor being +passed as an ``fdset``. Refer to the ``add-fd`` command documentation +for details on the ``fdset`` usage. + ``migrate-set-capabilities`` ``block`` option (removed in 9.1) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
migration/fd.c +7 -4
@@ -24,6 +24,7 @@#include "qemu/sockets.h" #include "io/channel-util.h" #include "trace.h" +#include "qapi/error.h" static bool fd_is_pipe (int fd) {
@@ -58,8 +59,9 @@ void fd_start_outgoing_migration(MigrationState *s, const char *fdname, Error ** }if (!migration_fd_valid (fd)) { -warn_report ("fd: migration to a file is deprecated." -" Use file: instead." ); +error_setg (errp,"fd: migration to a file is not supported." +" Use file: instead." ); +return ; }trace_migration_fd_outgoing (fd);
@@ -92,8 +94,9 @@ void fd_start_incoming_migration(const char *fdname, Error **errp) }if (!migration_fd_valid (fd)) { -warn_report ("fd: migration to a file is deprecated." -" Use file: instead." ); +error_setg (errp,"fd: migration to a file is not supported." +" Use file: instead." ); +return ; }trace_migration_fd_incoming (fd);
tests/qtest/migration/precopy-tests.c +0 -41
53 lines not on this page · raw message
Signature · 1 line
2.50.1
Quoted 10 lines · Peter Xu
v2:
- Added R-bs
- Updated description for removing zero-blocks [Markus]
- Squashed the "fd: to file" test removal into the 2nd patch
- I dropped the COLO patch, I have a local patch to remove colo migration completely, but looks like we won't do it.. Let's leave it for later but do the rest firstThis series removes two deprecated features for 11.0.
Quoted 7 lines
Please review, thanks.
Peter Xu (2):
migration: Remove zero-blocks capability
migration: Remove fd: support on filesdocs/about/deprecated.rst | 20 -------------
Note that per the 'MAINTAINERS' file, changes to any deprecations ought to be CC'd to the libvirt list for visibility.
In this case we've forgotten about the deprecation and didn't fix it before the qemu cahnge was pushed. I'll send out patches soon, but keep in mind to *always* CC the libvirt list with deprecations.
Quoted 17 lines · Peter Krempa
Quoted 16 lines · Peter Xu
v2:
- Added R-bs
- Updated description for removing zero-blocks [Markus]
- Squashed the "fd: to file" test removal into the 2nd patch
- I dropped the COLO patch, I have a local patch to remove colo migration completely, but looks like we won't do it.. Let's leave it for later but do the rest firstThis series removes two deprecated features for 11.0.
Please review, thanks.
Peter Xu (2):
migration: Remove zero-blocks capability
migration: Remove fd: support on files
Quoted 8 lines
Quoted 1 line
docs/about/deprecated.rst | 20 -------------Note that per the '
MAINTAINERS' file, changes to any deprecations ought to be CC'd to the libvirt list for visibility.In this case we've forgotten about the deprecation and didn't fix it before the qemu cahnge was pushed. I'll send out patches soon, but keep in mind to *always* CC the libvirt list with deprecations.
I'm suprised to see libvirt broken at all here.
AFAIR, the 'fd:' protocol inadvertantly gained support for targetting plain files, which the deprecation aimed to then revert (remove). The actual removal though seems to have targetted anything which is not a socket, which includes pipes, which libvirt was using.
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
Quoted 27 lines · Daniel P. Berrangé
Quoted 17 lines · Peter Krempa
Quoted 16 lines · Peter Xu
v2:
- Added R-bs
- Updated description for removing zero-blocks [Markus]
- Squashed the "fd: to file" test removal into the 2nd patch
- I dropped the COLO patch, I have a local patch to remove colo migration completely, but looks like we won't do it.. Let's leave it for later but do the rest firstThis series removes two deprecated features for 11.0.
Please review, thanks.
Peter Xu (2):
migration: Remove zero-blocks capability
migration: Remove fd: support on filesQuoted 8 lines
Quoted 1 line
docs/about/deprecated.rst | 20 -------------Note that per the '
MAINTAINERS' file, changes to any deprecations ought to be CC'd to the libvirt list for visibility.In this case we've forgotten about the deprecation and didn't fix it before the qemu cahnge was pushed. I'll send out patches soon, but keep in mind to *always* CC the libvirt list with deprecations.
Quoted 6 lines
I'm suprised to see libvirt broken at all here.
AFAIR, the 'fd:' protocol inadvertantly gained support for targetting plain files, which the deprecation aimed to then revert (remove). The actual removal though seems to have targetted anything which is not a socket, which includes pipes, which libvirt was using.
Libvirt is using pipes for *most* cases, but not all. There is one code path (virsh restore without compression or cache bypass, when residing on an actual filesystem (not a root squashed NFS)) which still can pass a file FD to the migration code as 'fd:'. In all other cases we do pass in a pipe in one way or another (via the compression program, virFileWrapper (mandatorily used on equivalents of 'virsh save', or the helper process used to access root-squashed NFS). The code is not easy to follow because there are numerous layers where the wrapping of the file into a pipe can happen, one of which is right next to the migration code. I'll soon post patches.
Anyways, my point was that notifications about deprecated and removed features ought to be CCd to the libvirt list regardless of perceived impact on libvirt.
Quoted 35 lines · Peter Krempa
Quoted 27 lines · Daniel P. Berrangé
Quoted 17 lines · Peter Krempa
Quoted 16 lines · Peter Xu
v2:
- Added R-bs
- Updated description for removing zero-blocks [Markus]
- Squashed the "fd: to file" test removal into the 2nd patch
- I dropped the COLO patch, I have a local patch to remove colo migration completely, but looks like we won't do it.. Let's leave it for later but do the rest firstThis series removes two deprecated features for 11.0.
Please review, thanks.
Peter Xu (2):
migration: Remove zero-blocks capability
migration: Remove fd: support on filesQuoted 8 lines
Quoted 1 line
docs/about/deprecated.rst | 20 -------------Note that per the '
MAINTAINERS' file, changes to any deprecations ought to be CC'd to the libvirt list for visibility.In this case we've forgotten about the deprecation and didn't fix it before the qemu cahnge was pushed. I'll send out patches soon, but keep in mind to *always* CC the libvirt list with deprecations.
Quoted 6 lines
I'm suprised to see libvirt broken at all here.
AFAIR, the 'fd:' protocol inadvertantly gained support for targetting plain files, which the deprecation aimed to then revert (remove). The actual removal though seems to have targetted anything which is not a socket, which includes pipes, which libvirt was using.
Quoted 10 lines
Libvirt is using pipes for *most* cases, but not all. There is one code path (virsh restore without compression or cache bypass, when residing on an actual filesystem (not a root squashed NFS)) which still can pass a file FD to the migration code as 'fd:'. In all other cases we do pass in a pipe in one way or another (via the compression program, virFileWrapper (mandatorily used on equivalents of 'virsh save', or the helper process used to access root-squashed NFS). The code is not easy to follow because there are numerous layers where the wrapping of the file into a pipe can happen, one of which is right next to the migration code. I'll soon post patches.
NB if there is any scenario where we passed a plain file to QEMU, that would be a bug in libvirt. The iohelper was intended to be used in *all* cases where we had plain files, so that we can ensure poll() works sanely for QEMU, and that we don't end up with an unkillable QEMU due to a syscall stuck in kernel on an uninterruptible sleep on dead storage.
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
Quoted 17 lines · Peter Krempa
Quoted 16 lines · Peter Xu
v2:
- Added R-bs
- Updated description for removing zero-blocks [Markus]
- Squashed the "fd: to file" test removal into the 2nd patch
- I dropped the COLO patch, I have a local patch to remove colo migration completely, but looks like we won't do it.. Let's leave it for later but do the rest firstThis series removes two deprecated features for 11.0.
Please review, thanks.
Peter Xu (2):
migration: Remove zero-blocks capability
migration: Remove fd: support on files
Quoted 8 lines
Quoted 1 line
docs/about/deprecated.rst | 20 -------------Note that per the '
MAINTAINERS' file, changes to any deprecations ought to be CC'd to the libvirt list for visibility.In this case we've forgotten about the deprecation and didn't fix it before the qemu cahnge was pushed. I'll send out patches soon, but keep in mind to *always* CC the libvirt list with deprecations.
Review fail (mine).
Should we try to make checkpatch.pl catch it? So far, it doesn't check
cc: at all.
Quoted 21 lines · Markus Armbruster
Quoted 19 lines · Peter Krempa
Quoted 17 lines · Peter Xu
v2:
- Added R-bs
- Updated description for removing zero-blocks [Markus]
- Squashed the "fd: to file" test removal into the 2nd patch
- I dropped the COLO patch, I have a local patch to remove colo migration completely, but looks like we won't do it.. Let's leave it for later but do the rest firstThis series removes two deprecated features for 11.0.
Please review, thanks.
Peter Xu (2):
migration: Remove zero-blocks capability
migration: Remove fd: support on filesdocs/about/deprecated.rst | 20 -------------
Quoted 8 lines
Quoted 6 lines
Note that per the '
MAINTAINERS' file, changes to any deprecations ought to be CC'd to the libvirt list for visibility.In this case we've forgotten about the deprecation and didn't fix it before the qemu cahnge was pushed. I'll send out patches soon, but keep in mind to *always* CC the libvirt list with deprecations.
Review fail (mine).
I confess I didn't notice this hard requirement when posting deprecation patches. I definitely kept in mind of libvirt all the time, it's just that for this one since it used to be discussed well I didn't expect this to cause any surprise.
Quoted 3 lines
Should we try to make checkpatch.pl catch it? So far, it doesn't check
cc: at all.
I don't know if that'll work because logically we can also copy anyone or lists only when sending patches (e.g. with "git send-email --cc")..
For now, I'll just remember to always copy libvirt list on touching deprecation file. My apologize if it caused any unwanted surprise.
Signature · 1 line
Peter Xu
Quoted 37 lines · Peter Xu
Quoted 21 lines · Markus Armbruster
Quoted 19 lines · Peter Krempa
Quoted 17 lines · Peter Xu
v2:
- Added R-bs
- Updated description for removing zero-blocks [Markus]
- Squashed the "fd: to file" test removal into the 2nd patch
- I dropped the COLO patch, I have a local patch to remove colo migration completely, but looks like we won't do it.. Let's leave it for later but do the rest firstThis series removes two deprecated features for 11.0.
Please review, thanks.
Peter Xu (2):
migration: Remove zero-blocks capability
migration: Remove fd: support on filesdocs/about/deprecated.rst | 20 -------------Quoted 8 lines
Quoted 6 lines
Note that per the '
MAINTAINERS' file, changes to any deprecations ought to be CC'd to the libvirt list for visibility.In this case we've forgotten about the deprecation and didn't fix it before the qemu cahnge was pushed. I'll send out patches soon, but keep in mind to *always* CC the libvirt list with deprecations.
Review fail (mine).
I confess I didn't notice this hard requirement when posting deprecation patches. I definitely kept in mind of libvirt all the time, it's just that for this one since it used to be discussed well I didn't expect this to cause any surprise.
Quoted 1 line
Quoted 5 lines
Quoted 2 lines
Should we try to make checkpatch.pl catch it? So far, it doesn't check
cc: at all.I don't know if that'll work because logically we can also copy anyone or lists only when sending patches (e.g. with "git send-email --cc")..
For what it's worth, scripts/get_maintainer.pl would have told us to cc:
libvirt with this line:
[email protected] (open list:Incompatible changes)
Quoted 2 lines
For now, I'll just remember to always copy libvirt list on touching deprecation file. My apologize if it caused any unwanted surprise.
We cannot and do not expect a patch submitter to know and remember everything. We rely on tooling and review to catch misses in time. Doesn't always work, because nothing and nobody's perfect.
Quoted 7 lines · Markus Armbruster
Quoted 2 lines · Peter Xu
I don't know if that'll work because logically we can also copy anyone or lists only when sending patches (e.g. with "git send-email --cc")..
For what it's worth,
scripts/get_maintainer.plwould have told us to cc:
libvirt with this line:
Quoted 8 lines
[email protected] (open list:Incompatible changes)
Quoted 2 lines
For now, I'll just remember to always copy libvirt list on touching deprecation file. My apologize if it caused any unwanted surprise.
We cannot and do not expect a patch submitter to know and remember everything. We rely on tooling and review to catch misses in time. Doesn't always work, because nothing and nobody's perfect.
If any contributor is sending patches to QEMU, please don't use the raw 'git send-email' command directly. Instead use 'git-publish' which wraps 'send-email' with logic that automatically consults get_maintainer.pl.
This means you'll always CC the required people by default, and have to conciously make an effort to drop them from the CC list.
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
Quoted 17 lines · Daniel P. Berrangé
Quoted 7 lines · Markus Armbruster
Quoted 2 lines · Peter Xu
I don't know if that'll work because logically we can also copy anyone or lists only when sending patches (e.g. with "git send-email --cc")..
For what it's worth,
scripts/get_maintainer.plwould have told us to cc:
libvirt with this line:Quoted 8 lines
[email protected] (open list:Incompatible changes)
Quoted 2 lines
For now, I'll just remember to always copy libvirt list on touching deprecation file. My apologize if it caused any unwanted surprise.
We cannot and do not expect a patch submitter to know and remember everything. We rely on tooling and review to catch misses in time. Doesn't always work, because nothing and nobody's perfect.
Quoted 6 lines
If any contributor is sending patches to QEMU, please don't use the raw 'git send-email' command directly. Instead use 'git-publish' which wraps 'send-email' with logic that automatically consults get_maintainer.pl.
This means you'll always CC the required people by default, and have to conciously make an effort to drop them from the CC list.
I am using git-publish, I found that it's because I have my own profile setup so it didn't use the default profile provided in .gitpublish, which offered cccmd=.
Now I've added that into my setup too, thanks for the suggestion.
Signature · 1 line
Peter Xu