Re: [libvirt PATCH v2 03/81] Introduce VIR_DOMAIN_RUNNING_POSTCOPY_FAILED

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

 



On Mon, Jun 06, 2022 at 14:35:10 +0200, Peter Krempa wrote:
> On Mon, Jun 06, 2022 at 14:29:20 +0200, Peter Krempa wrote:
> > On Wed, Jun 01, 2022 at 14:49:03 +0200, Jiri Denemark wrote:
> > > This new "post-copy failed" reason for the running state will be used on
> > > the destination host when post-copy migration fails while the domain is
> > > already running there.
> > > 
> > > Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> > > ---
> > > 
> > > Notes:
> > >     Version 2:
> > >     - documented both VIR_DOMAIN_RUNNING_POSTCOPY_FAILED and
> > >       VIR_DOMAIN_PAUSED_POSTCOPY_FAILED possibilities on the destination
> > > 
> > >  examples/c/misc/event-test.c     |  3 +++
> > >  include/libvirt/libvirt-domain.h |  2 ++
> > >  src/conf/domain_conf.c           |  1 +
> > >  src/libvirt-domain.c             | 26 +++++++++++++++++++-------
> > >  src/qemu/qemu_domain.c           |  3 +++
> > >  tools/virsh-domain-event.c       |  3 ++-
> > >  tools/virsh-domain-monitor.c     |  1 +
> > >  7 files changed, 31 insertions(+), 8 deletions(-)
> > 
> > [...]
> > 
> > > diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
> > > index e3ced700b8..b9f1d73d5a 100644
> > > --- a/src/libvirt-domain.c
> > > +++ b/src/libvirt-domain.c
> > > @@ -9764,10 +9764,16 @@ virDomainMigrateGetMaxSpeed(virDomainPtr domain,
> > >   * at most once no matter how fast it changes. On the other hand once the
> > >   * guest is running on the destination host, the migration can no longer be
> > >   * rolled back because none of the hosts has complete state. If this happens,
> > > - * libvirt will leave the domain paused on both hosts with
> > > - * VIR_DOMAIN_PAUSED_POSTCOPY_FAILED reason. It's up to the upper layer to
> > > - * decide what to do in such case. Because of this, libvirt will refuse to
> > > - * cancel post-copy migration via virDomainAbortJob.
> > > + * libvirt will leave the domain paused on the source host with
> > > + * VIR_DOMAIN_PAUSED_POSTCOPY_FAILED reason. The domain on the destination host
> > > + * will either remain running with VIR_DOMAIN_RUNNING_POSTCOPY_FAILED reason if
> > > + * libvirt loses control over the migration (e.g., the daemon is restarted or
> > > + * libvirt connection is broken) while QEMU is still able to continue migrating
> > > + * memory pages from the source to the destination or it will be paused with
> > > + * VIR_DOMAIN_PAUSED_POSTCOPY_FAILED if even the connection between QEMU
> > > + * processes gets broken. It's up to the upper layer to decide what to do in
> > 
> > I presume this bit is still up for discussion, right? Currently with the
> > RFC patch 81 you'd attempt to pause it but qemu will break anyways IIUC.
> > 
> > If that is the case, this should for now document it properly.
> 
> Never mind. I've re-read the paragraph (and code in next patch and
> noticed that it's meant on the source side, which makes sense.

But you were right, the text documents what RFC patch 81 is doing and
should be moved there.

Jirka




[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