Bug 1477922 - When trying to download a disk that's attached to a running VM or a locked disk, using Python SDK, error message placeholder is not resolved
When trying to download a disk that's attached to a running VM or a locked di...
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage (Show other bugs)
4.1.4
Unspecified Unspecified
unspecified Severity medium (vote)
: ovirt-4.2.0
: 4.2.0
Assigned To: Allon Mureinik
Natalie Gavrielov
:
Depends On: 1414499 1506284
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-03 04:51 EDT by Natalie Gavrielov
Modified: 2017-12-22 02:10 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-12-20 06:24:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.2+
amureini: devel_ack+


Attachments (Terms of Use)
engine.log (1.73 MB, application/zip)
2017-08-03 04:51 EDT, Natalie Gavrielov
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 80168 master MERGED core: Set action/type messages in TransferDiskImageCommand 2017-08-03 10:05 EDT
oVirt gerrit 80510 master MERGED webadmin: add VAR__ACTION__TRANSFER to AppErrors 2017-08-10 09:56 EDT

  None (edit)
Description Natalie Gavrielov 2017-08-03 04:51:51 EDT
Created attachment 1308643 [details]
engine.log

Description of problem:
When trying to download a disk that's attached to a running VM (disk is active), or when a disk is locked, using Python SDK, the error message shows a variable name instead of the variable's value. 

Version-Release number of selected component:
ovirt-engine-4.1.5-0.1.el7.noarch

How reproducible:
100%

Steps to Reproduce:
Download a disk that's attached to a VM - the VM should be running ("Up") and disk should be active.
OR
Download a disk while it is locked. 


Actual results:
The following error:
1.
$ ./download_disk.py 
Traceback (most recent call last):
  File "./download_disk.py", line 70, in <module>
    direction=types.ImageTransferDirection.DOWNLOAD,
  File "/usr/lib64/python2.7/site-packages/ovirtsdk4/services.py", line 12362, in add
    self._check_fault(response)
  File "/usr/lib64/python2.7/site-packages/ovirtsdk4/service.py", line 98, in _check_fault
    Service._raise_error(response, fault)
  File "/usr/lib64/python2.7/site-packages/ovirtsdk4/service.py", line 71, in _raise_error
    raise Error(msg)
ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is "[Cannot ${action} Storage. The disk qcow-vm_Disk1 is attached to VMs: qcow-vm-iscsi]". HTTP response code is 409.

2.
[ngavrilo@dhcp-4-76 examples]$ ./download_disk.py 
Traceback (most recent call last):
  File "./download_disk.py", line 70, in <module>
    direction=types.ImageTransferDirection.DOWNLOAD,
  File "/usr/lib64/python2.7/site-packages/ovirtsdk4/services.py", line 12362, in add
    self._check_fault(response)
  File "/usr/lib64/python2.7/site-packages/ovirtsdk4/service.py", line 98, in _check_fault
    Service._raise_error(response, fault)
  File "/usr/lib64/python2.7/site-packages/ovirtsdk4/service.py", line 71, in _raise_error
    raise Error(msg)
ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is "[Cannot ${action} Storage: The following disks are locked: test-vm-1_Disk1. Please try again in a few minutes.]". HTTP response code is 409.


Expected results:
Same error, with the value for variable: action
Comment 1 Natalie Gavrielov 2017-11-28 04:57:21 EST
Verified, the response now for downloading a disk that's attached to a running VM is:
./download_disk.py 
Traceback (most recent call last):
  File "./download_disk.py", line 70, in <module>
    direction=types.ImageTransferDirection.DOWNLOAD,
  File "build/bdist.linux-x86_64/egg/ovirtsdk4/services.py", line 10763, in add
  File "build/bdist.linux-x86_64/egg/ovirtsdk4/service.py", line 232, in _internal_add
  File "build/bdist.linux-x86_64/egg/ovirtsdk4/service.py", line 55, in wait
  File "build/bdist.linux-x86_64/egg/ovirtsdk4/service.py", line 229, in callback
  File "build/bdist.linux-x86_64/egg/ovirtsdk4/service.py", line 132, in _check_fault
  File "build/bdist.linux-x86_64/egg/ovirtsdk4/service.py", line 118, in _raise_error
ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is "[Cannot transfer Virtual Disk. The disk golden_mixed_virtio_template is plugged to non-Down VMs: test]". HTTP response code is 409.

Build: ovirt-engine-4.2.0-0.0.master.20171124141652.gita5b4f9b.el7.centos.noarch
Comment 2 Sandro Bonazzola 2017-12-20 06:24:17 EST
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

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