[libvirt PATCH v4 0/4] Ask qemu about migration blockers

Eugenio Pérez posted 4 patches 1 year, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20220720160549.3168021-1-eperezma@redhat.com
src/qemu/qemu_capabilities.c                  |  2 +
src/qemu/qemu_capabilities.h                  |  1 +
src/qemu/qemu_migration.c                     | 34 +++++++++++++-
src/qemu/qemu_monitor.c                       | 11 +++++
src/qemu/qemu_monitor.h                       |  4 ++
src/qemu/qemu_monitor_json.c                  | 44 +++++++++++++++++++
src/qemu/qemu_monitor_json.h                  |  3 ++
.../caps_6.0.0.aarch64.xml                    |  1 +
.../qemucapabilitiesdata/caps_6.0.0.s390x.xml |  1 +
.../caps_6.0.0.x86_64.xml                     |  1 +
.../caps_6.1.0.x86_64.xml                     |  1 +
.../caps_6.2.0.aarch64.xml                    |  1 +
.../qemucapabilitiesdata/caps_6.2.0.ppc64.xml |  1 +
.../caps_6.2.0.x86_64.xml                     |  1 +
.../caps_7.0.0.aarch64.xml                    |  1 +
.../qemucapabilitiesdata/caps_7.0.0.ppc64.xml |  1 +
.../caps_7.0.0.x86_64.xml                     |  1 +
.../caps_7.1.0.x86_64.xml                     |  1 +
18 files changed, 109 insertions(+), 1 deletion(-)
[libvirt PATCH v4 0/4] Ask qemu about migration blockers
Posted by Eugenio Pérez 1 year, 9 months ago
There are some hardcoded migration blockers in libvirt, like having a net
vhost-vdpa device. While it's true that they cannot be migrated at the moment,
there are plans to be able to migrate them soon.

They'll put a migration blockers in the cases where you cannot migrate them.
Ask qemu about then before rejecting the migration. In case the question is not
possible, assume they're not migratable.

v4:
* Do not override qemuDomainGetMigrationBlockers error calling again
  virReportError.
* Replace ", " with "; " in blockers separators.

v3:
* Return ok in qemuMonitorJSONGetMigrationBlockers is there are no
  blockers.
* Fix indentation
* Report all blockers instead of only the first.
* Squash some patches
* Move note to function doc.
* s/QEMU_MIGRATION_BLOCKED_REASONS/QEMU_CAPS_MIGRATION_BLOCKED_REASONS/

v2:
* Ask qemu if it has some pending blockers before try the migration

Eugenio Pérez (3):
  qemu_monitor: add support for get qemu migration blockers
  qemu_migration: get migration blockers before hardcoded checks
  qemu_migration: Do not forbid vDPA devices if can query blockers

Jonathon Jongsma (1):
  qemu: introduce capability QEMU_CAPS_MIGRATION_BLOCKED_REASONS

 src/qemu/qemu_capabilities.c                  |  2 +
 src/qemu/qemu_capabilities.h                  |  1 +
 src/qemu/qemu_migration.c                     | 34 +++++++++++++-
 src/qemu/qemu_monitor.c                       | 11 +++++
 src/qemu/qemu_monitor.h                       |  4 ++
 src/qemu/qemu_monitor_json.c                  | 44 +++++++++++++++++++
 src/qemu/qemu_monitor_json.h                  |  3 ++
 .../caps_6.0.0.aarch64.xml                    |  1 +
 .../qemucapabilitiesdata/caps_6.0.0.s390x.xml |  1 +
 .../caps_6.0.0.x86_64.xml                     |  1 +
 .../caps_6.1.0.x86_64.xml                     |  1 +
 .../caps_6.2.0.aarch64.xml                    |  1 +
 .../qemucapabilitiesdata/caps_6.2.0.ppc64.xml |  1 +
 .../caps_6.2.0.x86_64.xml                     |  1 +
 .../caps_7.0.0.aarch64.xml                    |  1 +
 .../qemucapabilitiesdata/caps_7.0.0.ppc64.xml |  1 +
 .../caps_7.0.0.x86_64.xml                     |  1 +
 .../caps_7.1.0.x86_64.xml                     |  1 +
 18 files changed, 109 insertions(+), 1 deletion(-)

-- 
2.31.1

Re: [libvirt PATCH v4 0/4] Ask qemu about migration blockers
Posted by Laine Stump 1 year, 9 months ago
This all looks good except a couple small nits that I've noted in 
separate messages for the individual patches.

I've already made these minor changes locally and pushed them here:

   https://gitlab.com/lainestump/libvirt/-/commits/REVIEW

If it all looks okay to you, I'll push it as soon as I get up in the AM. 
If you don't like the changes I've made to the commit log messages, feel 
free to revise and re-send them :-)

This is a pretty good turn around time for your first patch in libvirt. 
Thanks for the contribution!

On 7/20/22 12:05 PM, Eugenio Pérez wrote:
> There are some hardcoded migration blockers in libvirt, like having a net
> vhost-vdpa device. While it's true that they cannot be migrated at the moment,
> there are plans to be able to migrate them soon
> 
> They'll put a migration blockers in the cases where you cannot migrate them.
> Ask qemu about then before rejecting the migration. In case the question is not
> possible, assume they're not migratable.
> 
> v4:
> * Do not override qemuDomainGetMigrationBlockers error calling again
>    virReportError.
> * Replace ", " with "; " in blockers separators.
> 
> v3:
> * Return ok in qemuMonitorJSONGetMigrationBlockers is there are no
>    blockers.
> * Fix indentation
> * Report all blockers instead of only the first.
> * Squash some patches
> * Move note to function doc.
> * s/QEMU_MIGRATION_BLOCKED_REASONS/QEMU_CAPS_MIGRATION_BLOCKED_REASONS/
> 
> v2:
> * Ask qemu if it has some pending blockers before try the migration
> 
> Eugenio Pérez (3):
>    qemu_monitor: add support for get qemu migration blockers
>    qemu_migration: get migration blockers before hardcoded checks
>    qemu_migration: Do not forbid vDPA devices if can query blockers
> 
> Jonathon Jongsma (1):
>    qemu: introduce capability QEMU_CAPS_MIGRATION_BLOCKED_REASONS
> 
>   src/qemu/qemu_capabilities.c                  |  2 +
>   src/qemu/qemu_capabilities.h                  |  1 +
>   src/qemu/qemu_migration.c                     | 34 +++++++++++++-
>   src/qemu/qemu_monitor.c                       | 11 +++++
>   src/qemu/qemu_monitor.h                       |  4 ++
>   src/qemu/qemu_monitor_json.c                  | 44 +++++++++++++++++++
>   src/qemu/qemu_monitor_json.h                  |  3 ++
>   .../caps_6.0.0.aarch64.xml                    |  1 +
>   .../qemucapabilitiesdata/caps_6.0.0.s390x.xml |  1 +
>   .../caps_6.0.0.x86_64.xml                     |  1 +
>   .../caps_6.1.0.x86_64.xml                     |  1 +
>   .../caps_6.2.0.aarch64.xml                    |  1 +
>   .../qemucapabilitiesdata/caps_6.2.0.ppc64.xml |  1 +
>   .../caps_6.2.0.x86_64.xml                     |  1 +
>   .../caps_7.0.0.aarch64.xml                    |  1 +
>   .../qemucapabilitiesdata/caps_7.0.0.ppc64.xml |  1 +
>   .../caps_7.0.0.x86_64.xml                     |  1 +
>   .../caps_7.1.0.x86_64.xml                     |  1 +
>   18 files changed, 109 insertions(+), 1 deletion(-)
> 

Re: [libvirt PATCH v4 0/4] Ask qemu about migration blockers
Posted by Eugenio Perez Martin 1 year, 9 months ago
On Thu, Jul 21, 2022 at 7:02 AM Laine Stump <laine@redhat.com> wrote:
>
> This all looks good except a couple small nits that I've noted in
> separate messages for the individual patches.
>
> I've already made these minor changes locally and pushed them here:
>
>    https://gitlab.com/lainestump/libvirt/-/commits/REVIEW
>
> If it all looks okay to you, I'll push it as soon as I get up in the AM.
> If you don't like the changes I've made to the commit log messages, feel
> free to revise and re-send them :-)
>

All changes look good to me :). Not an english native, and not used to
libvirt codebase so I missed a few of these coding styles.

Thanks!

> This is a pretty good turn around time for your first patch in libvirt.
> Thanks for the contribution!
>
> On 7/20/22 12:05 PM, Eugenio Pérez wrote:
> > There are some hardcoded migration blockers in libvirt, like having a net
> > vhost-vdpa device. While it's true that they cannot be migrated at the moment,
> > there are plans to be able to migrate them soon
> >
> > They'll put a migration blockers in the cases where you cannot migrate them.
> > Ask qemu about then before rejecting the migration. In case the question is not
> > possible, assume they're not migratable.
> >
> > v4:
> > * Do not override qemuDomainGetMigrationBlockers error calling again
> >    virReportError.
> > * Replace ", " with "; " in blockers separators.
> >
> > v3:
> > * Return ok in qemuMonitorJSONGetMigrationBlockers is there are no
> >    blockers.
> > * Fix indentation
> > * Report all blockers instead of only the first.
> > * Squash some patches
> > * Move note to function doc.
> > * s/QEMU_MIGRATION_BLOCKED_REASONS/QEMU_CAPS_MIGRATION_BLOCKED_REASONS/
> >
> > v2:
> > * Ask qemu if it has some pending blockers before try the migration
> >
> > Eugenio Pérez (3):
> >    qemu_monitor: add support for get qemu migration blockers
> >    qemu_migration: get migration blockers before hardcoded checks
> >    qemu_migration: Do not forbid vDPA devices if can query blockers
> >
> > Jonathon Jongsma (1):
> >    qemu: introduce capability QEMU_CAPS_MIGRATION_BLOCKED_REASONS
> >
> >   src/qemu/qemu_capabilities.c                  |  2 +
> >   src/qemu/qemu_capabilities.h                  |  1 +
> >   src/qemu/qemu_migration.c                     | 34 +++++++++++++-
> >   src/qemu/qemu_monitor.c                       | 11 +++++
> >   src/qemu/qemu_monitor.h                       |  4 ++
> >   src/qemu/qemu_monitor_json.c                  | 44 +++++++++++++++++++
> >   src/qemu/qemu_monitor_json.h                  |  3 ++
> >   .../caps_6.0.0.aarch64.xml                    |  1 +
> >   .../qemucapabilitiesdata/caps_6.0.0.s390x.xml |  1 +
> >   .../caps_6.0.0.x86_64.xml                     |  1 +
> >   .../caps_6.1.0.x86_64.xml                     |  1 +
> >   .../caps_6.2.0.aarch64.xml                    |  1 +
> >   .../qemucapabilitiesdata/caps_6.2.0.ppc64.xml |  1 +
> >   .../caps_6.2.0.x86_64.xml                     |  1 +
> >   .../caps_7.0.0.aarch64.xml                    |  1 +
> >   .../qemucapabilitiesdata/caps_7.0.0.ppc64.xml |  1 +
> >   .../caps_7.0.0.x86_64.xml                     |  1 +
> >   .../caps_7.1.0.x86_64.xml                     |  1 +
> >   18 files changed, 109 insertions(+), 1 deletion(-)
> >
>