Bug 1131160 - [vdsm] prepareImage and teardownImage commands executed via vdsClient works even though they were executed with an invalid volUUID value.
Summary: [vdsm] prepareImage and teardownImage commands executed via vdsClient works e...
Keywords:
Status: CLOSED DUPLICATE of bug 1133617
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: 3.5
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.5.0
Assignee: Federico Simoncelli
QA Contact: Aharon Canan
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-18 15:01 UTC by Elad
Modified: 2016-02-10 19:44 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-04 12:27:51 UTC
oVirt Team: Storage
Embargoed:


Attachments (Terms of Use)
vdsm.log (1.81 KB, application/x-gzip)
2014-08-18 15:01 UTC, Elad
no flags Details

Description Elad 2014-08-18 15:01:32 UTC
Created attachment 927944 [details]
vdsm.log

Description of problem:
Tried to run a prepareImage via vdsClient, only I've given it a wrong volUUID value. The command succeeded and the volumes in the image were prepared. I got the following error in vdsm.log:

Thread-63::ERROR::2014-08-18 17:53:20,967::dispatcher::79::Storage.Dispatcher::(wrapper) local variable 'leafInfo' referenced before assignment
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/dispatcher.py", line 71, in wrapper
    result = ctask.prepare(func, *args, **kwargs)
  File "/usr/share/vdsm/storage/task.py", line 103, in wrapper
    return m(self, *a, **kw)
  File "/usr/share/vdsm/storage/task.py", line 1179, in prepare
    raise self.error
UnboundLocalError: local variable 'leafInfo' referenced before assignment



Version-Release number of selected component (if applicable):
vdsm-4.16.1-6.gita4a4614.el6.x86_64
vdsm-cli-4.16.1-6.gita4a4614.el6.noarch

How reproducible:
Always

Steps to Reproduce:
on block storage:
1) Create a VM with disk 
2) From vdsClient run the PrepareImage command with an incorrect volUUID value

Actual results:


The host is connected to this pool:

[root@nott-vds2 ~]# vdsClient -s 0 getConnectedStoragePoolsList
1500df81-6ddb-409f-9cb8-1704df334b2f


volume 228f1994-853a-4436-83a0-00486aac7a74 is deactivated:

228f1994-853a-4436-83a0-00486aac7a74 8f087807-9caa-4d24-83c5-8050390500c5 -wi-------   1.00g


[root@nott-vds2 2888eead-8c89-412b-a6f5-af3e92655e97]# vdsClient -s 0 prepareImage 1500-6ddb-409f-9cb8-1704df334b2f 8f087807-9caa-4d24-83c5-8050390500c5 2888eead-8c89-412b-a6f5-af3e92655e97 blablabla


I'm getting this output:
local variable 'leafInfo' referenced before assignment


Now the LV is active:

 228f1994-853a-4436-83a0-00486aac7a74 8f087807-9caa-4d24-83c5-8050390500c5 -wi-a-----   1.00g



Expected results:
If volUUID value is invalid, the command should fail

Additional info:
vdsm.log

Comment 1 Allon Mureinik 2014-08-27 16:23:00 UTC
Reducing priority as vdsClient is not part of the major flows.

Comment 2 Federico Simoncelli 2014-09-04 12:27:51 UTC

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


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