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

Jiri Denemark jdenemar at redhat.com
Fri May 13 13:07:01 UTC 2022


On Wed, May 11, 2022 at 15:27:53 +0200, Peter Krempa wrote:
> 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 at redhat.com>
> > ---
> >  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.

Yeah. I'll make a follow up patch to fix this.

Jirka


More information about the libvir-list mailing list