[RFC PATCH 0/7] Fix issue when storage migration is requested but there are no disks to migrate

Peter Krempa posted 7 patches 3 years ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1618328187.git.pkrempa@redhat.com
src/libvirt_private.syms         |   1 +
src/qemu/qemu_migration.c        | 102 ++++++++++++++++++-------------
src/qemu/qemu_migration_cookie.c |   2 +-
src/util/virxml.c                |  42 ++++++++-----
src/util/virxml.h                |   7 +++
5 files changed, 95 insertions(+), 59 deletions(-)
[RFC PATCH 0/7] Fix issue when storage migration is requested but there are no disks to migrate
Posted by Peter Krempa 3 years ago
In certain weird cases and due to very crusty code we'd instruct qemu to
migrate storage using the old style storage migration when there wasn't
anything to migrate. This was caused by a recent refactor.

Note that the series is RFC as I didn't really test it yet, but feel
free to provide feedback.

Peter Krempa (7):
  util: xml: Introduce virXMLFormatElementEmpty
  qemuMigrationCookieNBDXMLFormat: Format empty <nbd/> element
  qemuMigrationSrcNBDStorageCopy: Return error code on error
  qemuMigrationSrcNBDStorageCopy: Don't pass migrate_flags
  qemuMigrationSrcRun: Sanitize setting of cookieFlags and migrate_flags
    on storage migration
  qemuMigrationSrcRun: Don't attempt any storage migration if no disks
    will be migrated
  qemuMigrationSrcBeginPhase: Don't offer 'nbd' in cookie if there are
    no disks to migrate

 src/libvirt_private.syms         |   1 +
 src/qemu/qemu_migration.c        | 102 ++++++++++++++++++-------------
 src/qemu/qemu_migration_cookie.c |   2 +-
 src/util/virxml.c                |  42 ++++++++-----
 src/util/virxml.h                |   7 +++
 5 files changed, 95 insertions(+), 59 deletions(-)

-- 
2.30.2

Re: [RFC PATCH 0/7] Fix issue when storage migration is requested but there are no disks to migrate
Posted by Andrea Bolognani 3 years ago
On Tue, 2021-04-13 at 17:38 +0200, Peter Krempa wrote:
> In certain weird cases and due to very crusty code we'd instruct qemu to
> migrate storage using the old style storage migration when there wasn't
> anything to migrate. This was caused by a recent refactor.
> 
> Note that the series is RFC as I didn't really test it yet, but feel
> free to provide feedback.
> 
> Peter Krempa (7):
>   util: xml: Introduce virXMLFormatElementEmpty
>   qemuMigrationCookieNBDXMLFormat: Format empty <nbd/> element
>   qemuMigrationSrcNBDStorageCopy: Return error code on error
>   qemuMigrationSrcNBDStorageCopy: Don't pass migrate_flags
>   qemuMigrationSrcRun: Sanitize setting of cookieFlags and migrate_flags
>     on storage migration
>   qemuMigrationSrcRun: Don't attempt any storage migration if no disks
>     will be migrated
>   qemuMigrationSrcBeginPhase: Don't offer 'nbd' in cookie if there are
>     no disks to migrate

My knowledge of migration code is such that, while your changes look
reasonable overall, I don't feel too confident ACKing them myself and
would prefer if someone with more expertise in the area would go over
them instead.

I can, however, offer a

  Tested-by: Andrea Bolognani <abologna@redhat.com>

for the series, as I have verified that it makes the KubeVirt test
suite failure that brought this issue to our attention in the first
place go away.

-- 
Andrea Bolognani / Red Hat / Virtualization

Re: [RFC PATCH 0/7] Fix issue when storage migration is requested but there are no disks to migrate
Posted by Michal Privoznik 3 years ago
On 4/13/21 5:38 PM, Peter Krempa wrote:
> In certain weird cases and due to very crusty code we'd instruct qemu to
> migrate storage using the old style storage migration when there wasn't
> anything to migrate. This was caused by a recent refactor.
> 
> Note that the series is RFC as I didn't really test it yet, but feel
> free to provide feedback.
> 
> Peter Krempa (7):
>    util: xml: Introduce virXMLFormatElementEmpty
>    qemuMigrationCookieNBDXMLFormat: Format empty <nbd/> element
>    qemuMigrationSrcNBDStorageCopy: Return error code on error
>    qemuMigrationSrcNBDStorageCopy: Don't pass migrate_flags
>    qemuMigrationSrcRun: Sanitize setting of cookieFlags and migrate_flags
>      on storage migration
>    qemuMigrationSrcRun: Don't attempt any storage migration if no disks
>      will be migrated
>    qemuMigrationSrcBeginPhase: Don't offer 'nbd' in cookie if there are
>      no disks to migrate
> 
>   src/libvirt_private.syms         |   1 +
>   src/qemu/qemu_migration.c        | 102 ++++++++++++++++++-------------
>   src/qemu/qemu_migration_cookie.c |   2 +-
>   src/util/virxml.c                |  42 ++++++++-----
>   src/util/virxml.h                |   7 +++
>   5 files changed, 95 insertions(+), 59 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal