[ovirt-devel] [ovirt-users] Unremovable disks created through the API

Arik Hadas ahadas at redhat.com
Wed Mar 7 14:07:49 UTC 2018


On Wed, Mar 7, 2018 at 3:37 PM, Richard W.M. Jones <rjones at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20180307/c235863c/attachment.html>


More information about the Devel mailing list