On Tue, Mar 6, 2018 at 11:19 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
On Tue, Mar 06, 2018 at 11:14:40PM +0200, Arik Hadas wrote:
> On Tue, Mar 6, 2018 at 9:18 PM, Richard W.M. Jones <rjones@redhat.com>
> wrote:
>
> >
> > I've been playing with disk uploads through the API.  As a result
> > I now have lots of disks in the states "Paused by System" and
> > "Paused by User".  They are not attached to any VM, and I'm logged
> > in as admin@internal, but there seems to be no way to use them.
> > Even worse I've now run out of space so can't do anything else.
> >
> > How can I remove them?
>
>
> > Screenshot: http://oirase.annexia.org/tmp/ovirt.png
>
>
> Hi Richard,
>
> Selecting Upload->Cancel at that tab will remove such a disk.
> Note that it may take a minute or two.

Yes, that works, thanks.

(Moving to devel-list)
BTW, I think that the import process should include a preliminary phase where ovirt-engine is informed that the import process starts.

Currently, IIUC, the new process is designed to be:
1. virt-v2v uploads the disks
2. virt-v2v calls an API with the OVF configuration so ovirt-engine will add the VM and attach the uploaded disks to that VM

IMHO, the process should be comprised of:
1. virt-v2v calls an API with the (probably partial since the OS and other things are unknown at that point) OVF configuration
2. virt-v2v uploads the disks
3. virt-v2v provides the up-to-date configuration

Step #1 will enable ovirt-engine:
1. Most importantly, to cleanup uploaded disks in case of an error during the import process. Otherwise, we require the client to clean them up, which can be challenging (e.g., if the virt-v2v process crashes).
2. To inform the user that the process has started - so he won't get surprised by seeing disks being uploaded suddenly. That will give a context to these upload operations.
3. To inform the user about the progress of the import process, much like we do today when importing VMs from vSphere to RHV.
4. To perform validations on the (partial) VM configuration, e.g., verifying that no VM with the same name exists/verifying there is enough space (optionally mapping different disks to different storage devices) and so on, before uploading the disks.

The gaps I see:
1. We don't have a command for step #1 yet but that's something we can provide relatively quickly. We need it also to support uploading an OVA via oVirt's webadmin.
2. We have a command for step #3, but it is not exposed via the API.
 

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