Re: [libvirt PATCH 22/80] qemu: Handle 'postcopy-paused' migration state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 10, 2022 at 17:20:43 +0200, Jiri Denemark wrote:
> When connection breaks during post-copy migration, QEMU enters
> 'postcopy-paused' state. We need to handle this state and make the
> situation visible to upper layers.
> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> ---
>  src/hypervisor/domain_job.c  |  1 +
>  src/hypervisor/domain_job.h  |  1 +
>  src/qemu/qemu_driver.c       |  1 +
>  src/qemu/qemu_migration.c    | 11 +++++++++++
>  src/qemu/qemu_monitor.c      |  1 +
>  src/qemu/qemu_monitor.h      |  1 +
>  src/qemu/qemu_monitor_json.c |  1 +
>  src/qemu/qemu_process.c      | 33 ++++++++++++++++++++-------------
>  8 files changed, 37 insertions(+), 13 deletions(-)

[...]

> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 72a2846d1f..e5e33556e3 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c

[...]

> @ -1883,6 +1887,12 @@ qemuMigrationJobCheckStatus(virQEMUDriver *driver,
>                         qemuMigrationJobName(vm), _("canceled by client"));
>          return -1;
>  
> +    case VIR_DOMAIN_JOB_STATUS_POSTCOPY_PAUSED:
> +        virReportError(VIR_ERR_OPERATION_FAILED, _("%s: %s"),
> +                       qemuMigrationJobName(vm),
> +                       _("post-copy phase failed"));

This is very translation unfriendly:

https://www.libvirt.org/coding-style.html#error-message-format

I see it's a common theme in this function though ... bleah.


> +        return -1;
> +
>      case VIR_DOMAIN_JOB_STATUS_COMPLETED:
>      case VIR_DOMAIN_JOB_STATUS_ACTIVE:
>      case VIR_DOMAIN_JOB_STATUS_MIGRATING:

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux