Bug 1728693

Summary: Download disk-snapshot failed with error "Disk is locked." when using pythons sdk
Product: [oVirt] ovirt-engine-sdk-python Reporter: Yosi Ben Shimon <ybenshim>
Component: CoreAssignee: Fedor Gavrilov <fgavrilo>
Status: CLOSED DUPLICATE QA Contact: Lukas Svaty <lsvaty>
Severity: high Docs Contact:
Priority: medium    
Version: 4.3.0CC: bugs, eshenitz, frolland, juan.hernandez, lsvaty, tnisan
Target Milestone: ovirt-4.4.3Flags: sbonazzo: ovirt-4.4?
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-16 08:40:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1707372    

Description Yosi Ben Shimon 2019-07-10 13:05:42 UTC
Description of problem:
Download disk-snapshot fails when trying using python sdk.
The first disk-snapshot was downloaded successfully, but the second failed with:

Engine log:

2019-07-10 15:27:06,930+03 WARN  [org.ovirt.engine.core.bll.storage.disk.image.TransferDiskImageCommand] (default task-32) [d245e6ec-4e85-4df7-8c7b-1ce77527fa2f] Validation of action 'TransferDiskImage' failed f
or user admin@internal-authz. Reasons: VAR__TYPE__DISK,VAR__ACTION__TRANSFER,ACTION_TYPE_FAILED_DISK_IS_LOCKED
2019-07-10 15:27:06,932+03 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-32) [] Operation Failed: [Cannot transfer Virtual Disk: Disk is locked. Please try again later.]


Version-Release number of selected component (if applicable):
ovirt-engine-4.3.5.3-0.1.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. Create a VM with disk reside on file domain
2. Create 2 snapshots
3. Try to download using: https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/download_disk_snapshots.py

Actual results:
Only the first disk-snapshot was downloaded

Expected results:
All the VM's disk-snapshots should download successfully

Additional info:
Same fix as in this bug https://bugzilla.redhat.com/show_bug.cgi?id=1707372 but for download_disk_snapshot.py

Comment 2 Sandro Bonazzola 2019-09-30 20:59:20 UTC
This bug is targeted to 4.4.0 and is blocking bug #1707372 which is targeted to 4.3.7.
Either re-target this bug to 4.3.7 or postpone bug #1707372 to 4.4.0

Comment 3 Sandro Bonazzola 2019-09-30 20:59:57 UTC
sorry, retarget myself by mistake. restoring 4.4.0

Comment 4 Eyal Shenitzky 2020-06-16 08:40:50 UTC
We do not support in downloading multiple snapshot disks in parallel,
when we download one of the snapshot disks we locked all the chain.

We already have an RFE to support the requested behavior, closing the bug as duplication.

*** This bug has been marked as a duplicate of bug 1677500 ***