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
Summary: When trying to download a disk that's attached to a running VM or a locked di...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.1.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.2.0
: 4.2.0
Assignee: Allon Mureinik
QA Contact: Natalie Gavrielov
URL:
Whiteboard:
Depends On: 1414499 1506284
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-03 08:51 UTC by Natalie Gavrielov
Modified: 2017-12-22 07:10 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-12-20 11:24:17 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.2+
amureini: devel_ack+


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


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 80168 0 master MERGED core: Set action/type messages in TransferDiskImageCommand 2020-04-30 15:41:30 UTC
oVirt gerrit 80510 0 master MERGED webadmin: add VAR__ACTION__TRANSFER to AppErrors 2020-04-30 15:41:30 UTC

Description Natalie Gavrielov 2017-08-03 08:51:51 UTC
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 09:57:21 UTC
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 11:24:17 UTC
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.