Bug 1414499 - [RFE] ability to download images that are attached to vms
Summary: [RFE] ability to download images that are attached to vms
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RFEs
Version: 4.1.0.2
Hardware: Unspecified
OS: Unspecified
high
high vote
Target Milestone: ovirt-4.1.5
: 4.1.5
Assignee: Allon Mureinik
QA Contact: Natalie Gavrielov
URL:
Whiteboard:
Depends On:
Blocks: 659847 1477922
TreeView+ depends on / blocked
 
Reported: 2017-01-18 16:26 UTC by Natalie Gavrielov
Modified: 2017-08-23 08:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Uploading/downloading disks attached to VMs was blocked by a validation on the engine's side. Consequence: It's impossible to upload/download a disk that's part of a VM. In order to do so, you'd have to detach the disk, upload/download, and then attach it again. Fix: Remove the blocking in case the VM is down or the disk is unplugged. Result: It's no possible to upload/download any disk that isn't plugged to a non-down VM - i.e., floating disks, disks that are attached but unplugged to any VM, and disks that are plugged to DOWN vms.
Clone Of:
Environment:
Last Closed: 2017-08-23 08:05:16 UTC
oVirt Team: Storage
rule-engine: ovirt-4.1+
ylavi: planning_ack+
amureini: devel_ack+
ratamir: testing_ack+


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 79061 master MERGED core: Allow transferring images for down VMs 2017-07-10 19:59:39 UTC
oVirt gerrit 79205 master MERGED core: Allow transferring for unplugged disks 2017-07-10 19:59:41 UTC
oVirt gerrit 79206 master MERGED core: Sort results of DiskValidator#isDiskAPluggedToAnyNonDownVm 2017-07-10 19:59:44 UTC
oVirt gerrit 79334 ovirt-engine-4.1 MERGED core: DiskValidator#isDiskAttachedToAnyVm streams 2017-07-16 07:51:48 UTC
oVirt gerrit 79335 ovirt-engine-4.1 MERGED core: Allow transferring images for down VMs 2017-07-16 07:51:54 UTC
oVirt gerrit 79336 ovirt-engine-4.1 MERGED core: Allow transferring for unplugged disks 2017-07-16 07:51:59 UTC
oVirt gerrit 79337 ovirt-engine-4.1 MERGED core: Sort results of DiskValidator#isDiskAPluggedToAnyNonDownVm 2017-07-16 07:52:05 UTC

Description Natalie Gavrielov 2017-01-18 16:26:58 UTC
Description of problem:

Right now there is no option to download an image (using python-sdk) - if the image is attached to a vm.

This is the error:

    raise Error(msg)
ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is "[Cannot ${action} Storage. The disk 1gb-disk-raw-1mb-test is attached to VMs: test-upload-16-01-23-20]". HTTP response code is 409.

It would be nice to have the option to download a disk even when it's attached to vm.

Comment 1 Allon Mureinik 2017-07-05 15:55:29 UTC
Allowing upload/download of a disk attached to a non-down VM may require some delicate coordination/locking, but for a DOWN vm(s), this looks like an easy win.

Comment 2 Allon Mureinik 2017-07-10 09:26:19 UTC
(In reply to Allon Mureinik from comment #1)
> Allowing upload/download of a disk attached to a non-down VM may require
> some delicate coordination/locking, but for a DOWN vm(s), this looks like an
> easy win.

Actually, unplugged disks for VMs in any state should also be an easy win. I'll add a patch for that too.

Comment 3 Yaniv Lavi 2017-07-11 08:45:35 UTC
Can you consider a backport to 4.1.z?

Comment 4 Allon Mureinik 2017-07-12 10:52:54 UTC
(In reply to Yaniv Lavi from comment #3)
> Can you consider a backport to 4.1.z?

This implementation included some "cleanup" work to unify similar validations throughout the code, which I don't want to bother the z-stream with, but if we take just the minimal fix, it shouldn't be too much of a problem.
I'm restoring the needinfo until I evaluate this properly, and either post patches to backport it or have a good explanation why this won't be as easy as I thought.

Comment 5 Allon Mureinik 2017-07-12 13:34:16 UTC
(In reply to Allon Mureinik from comment #4)
> (In reply to Yaniv Lavi from comment #3)
> > Can you consider a backport to 4.1.z?
> 
> This implementation included some "cleanup" work to unify similar
> validations throughout the code, which I don't want to bother the z-stream
> with, but if we take just the minimal fix, it shouldn't be too much of a
> problem.
> I'm restoring the needinfo until I evaluate this properly, and either post
> patches to backport it or have a good explanation why this won't be as easy
> as I thought.

Patches backported.
The series still needs some verifications and review, but there's no reason it shouldn't be in by 4.1.5.

Comment 6 Natalie Gavrielov 2017-08-06 10:25:36 UTC
Verified using builds:
ovirt-engine-4.1.5-0.1.el7.noarch
ovirt-imageio-proxy-1.0.0-0.el7ev.noarch
ovirt-imageio-common-1.0.0-0.el7ev.noarch
vdsm-4.19.25-1.el7ev.x86_64
ovirt-imageio-daemon-1.0.0-0.el7ev.noarch


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