Bug 1734220 - RFE: support snapshot collapse on disk download from the webadmin
Summary: RFE: support snapshot collapse on disk download from the webadmin
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.3.4
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ovirt-4.5.0
: ---
Assignee: Nobody
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-30 02:21 UTC by Marcus West
Modified: 2021-10-20 16:17 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Storage
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 4310681 0 None None When trying to download a RHV disk image, the 'Download' button is not available 2019-07-30 02:33:14 UTC

Description Marcus West 2019-07-30 02:21:53 UTC
## Description of problem:

For some reason when trying to download disk images via the GUI, the 'Download' button is not always available.  Sometimes it's greyed out when the VM is not running.  And sometimes it's there even though the VM is running.

## Version-Release number of selected component (if applicable):

ovirt-engine-4.3.3.7-0.1.el7.noarch

## How reproducible:

consistently, but only some VM's are affected

## Steps to Reproduce:
1. Try to download a VM disk from the disk tab
2. If the button is not available, check if the VM is actually running or not
3.

## Actual results:

For some VM's the button is there even if it's running.  If you try to download, you get an error (as expected)
For other VM's the button is no there, even though the VM is not running

## Expected results:

If the VM is not running, the download button should be available
If the VM is running, the download button should not be available

## Additional info:

Using download_disk.py [1], I can download the disk image even if the button is not available.  Therefore I assume this is GUI issue.

Are their any other factors that influence whether a disk is available for download or not?

[1] https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/download_disk.py

Comment 2 Daniel Gur 2019-08-28 13:13:47 UTC
sync2jira

Comment 3 Daniel Gur 2019-08-28 13:18:00 UTC
sync2jira

Comment 4 Daniel Erez 2020-01-05 14:32:12 UTC
The download button availability is not affected by the status of the VM. 
I.e. we check whether the disk is attached to a running VM only in the backend validation.
For the download button availability in the GUI we check the following:
* Disk not during transfer already.
* Disk status is OK.
* Disk's actual size > 0.
* Disk doesn't have a parent.

As for downloads applicable from the rest-api and not the webadmin, do you remember which disks could be downloaded?

If those are disks that are based on a template (i.e. created using thin provisioning from a template) this is the expected
behaviour for now (until we support volume collapse during download). I.e. to allow api users to download the entire disk
chain (template layer and leaf layer), we support downloading disks with template using the api. For the GUI, we'll
enable downloading those disks once supporting auto collapse during transfer - so the user could get the
entire disk (including the template layer).

Comment 7 Nir Soffer 2020-01-06 21:01:13 UTC
We can enable download of entire disk in raw format for any disk, including
all snapshots from the UI. But this will be very inefficient, sending gigabytes
of zeroes over the wire, and creating fully allocated image full of zeroes.

Any advanced option will be available only via the SDK. We will have a command
line tool for uploading and downloading images, replacing upload_disk.py and
download_disk.py examples scripts in ovirt sdk. See bug 1626262.

Comment 10 Nir Soffer 2020-03-18 23:07:24 UTC
Implementing this for the UI does make sense because browsers do
not support sparseness, and cannot download the data efficiently.

But this feature is already in RHV 4.4 using the SDK.

This will download entire disk contents including all snapshots to 
raw image efficiently:

    $ echo -n my-password > password

    $ python3 download_disk.py --engine-url https://engine/ \
        --username admin@internal \
        --password-file password \
        --cafile ca.pem \
        --format raw \
        d352447e-d16c-4a1d-9b2a-c9c08dbff5c3 \
        disk.raw

This will download the same disk to collapsed qcow2 image:

    $ python3 download_disk.py --engine-url https://engine/ \
        --username admin@internal \
        --password-file password \
        --cafile ca.pem \
        --format qcow2 \
        d352447e-d16c-4a1d-9b2a-c9c08dbff5c3 \
        disk.qcow2

Comment 12 Eyal Shenitzky 2021-10-12 09:09:53 UTC
The requested functionality is already supported by the REST-API and implemented in the SDK.
There is no benefit in supporting it via the UI.

Comment 15 Marina Kalinin 2021-10-20 16:17:50 UTC
The KCS attached to this bug explains the warkaround available - use API: https://access.redhat.com/solutions/4310681


Note You need to log in before you can comment on or make changes to this bug.