On Wed, Mar 7, 2018 at 3:37 PM, Richard W.M. Jones <rjo...@redhat.com>
wrote:

> On Wed, Mar 07, 2018 at 03:12:58PM +0200, Arik Hadas wrote:
> > If for some predefined period of time no new disk is added or an upload
> > doesn't make any progress (assuming the uploads are done sequentially),
> to
> > fail the import operation and that would roll back the resources (disks,
> > VMs) that were created as part of the import process.
>
> At the moment we're actually trying to remove the disk on failure.
> However the disk_service.remove() API does nothing (doesn't even
> fail).  Perhaps because the transfer isn't finalized on the error
> path?
>

That's weird, it should fail to acquire the disk's lock.
In any case, I think that removing the disk this way would be wrong as we
also store an entity in the image_transfer table that should be removed
(otherwise, another attempt to upload the same disk would probably fail).
Daniel/Nir, I can't find a way to cancel an ongoing upload-image operation
through the API (as we have in the webadmin), am I missing it or is it
missing?


>
> Anyway the code - which needs review - is:
>
> https://www.redhat.com/archives/libguestfs/2018-March/msg00024.html
>
> Rich.
>
> --
> Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~
> rjones
> Read my programming and virtualization blog: http://rwmj.wordpress.com
> Fedora Windows cross-compiler. Compile Windows programs, test, and
> build Windows installers. Over 100 libraries supported.
> http://fedoraproject.org/wiki/MinGW
>
_______________________________________________
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

Reply via email to