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: ON_QA
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage (Show other bugs)
4.1.4
Unspecified Unspecified
unspecified Severity medium (vote)
: ovirt-4.2.0
: pre-alpha
Assigned To: Allon Mureinik
meital avital
:
Depends On: 1414499
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-03 04:51 EDT by Natalie Gavrielov
Modified: 2017-08-10 04:16 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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

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