[Libguestfs] [PATCH] v2v: rhv-upload-plugin: Fix waiting for finalize

Nir Soffer nsoffer at redhat.com
Fri Jul 16 14:55:08 UTC 2021


On Fri, Jul 16, 2021 at 11:18 AM Vojtech Juranek <vjuranek at redhat.com> wrote:
...
> > diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
> > index 07e879c9..11050358 100644
> > --- a/v2v/rhv-upload-plugin.py
> > +++ b/v2v/rhv-upload-plugin.py
> > @@ -607,17 +607,29 @@ def finalize_transfer(connection, transfer, disk_id):
> >      """
> >      Finalize a transfer, making the transfer disk available.
> >
> > -    If finalizing succeeds, transfer's phase will change to
> > FINISHED_SUCCESS -    and the transer's disk status will change to OK.  On
> > errors, the transfer's -    phase will change to FINISHED_FAILURE and the
> > disk status will change to -    ILLEGAL and it will be removed. In both
> > cases the transfer entity will be -    removed shortly after.
> > -
> > -    If oVirt fails to finalize the transfer, transfer's phase will change
> > to -    PAUSED_SYSTEM. In this case the disk's status will change to
> > ILLEGAL and it -    will not be removed.
> > -
> > -    For simplicity, we track only disk's status changes.
> > +    If finalizing succeeds, the transfer's disk status will change to OK
> > +    and transfer's phase will change to FINISHED_SUCCESS. Unfortunately,
> > +    the disk status is modified before the transfer finishes, and oVirt
> > +    may still hold a lock on the disk at this point.
> > +
> > +    The only way to make sure that the disk is unlocked, is to wait
> > +    until the transfer phase switches FINISHED_SUCCESS. Unfortunately
> > +    oVirt makes this hard to use because the transfer is removed shortly
> > +    after switching the phase to the final phase. However if the
> > +    transfer was removed, we can be sure that the disk is not unlocked,
>
> should be "disk is not locked"

Thanks, I will fix this before pushing.




More information about the Libguestfs mailing list