Bug 843387 - VDSM: unable to start VM (UnboundLocalError: local variable 'volPath' referenced before assignment)
VDSM: unable to start VM (UnboundLocalError: local variable 'volPath' refere...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: vdsm (Show other bugs)
6.3
x86_64 Linux
high Severity low
: beta
: ---
Assigned To: Eduardo Warszawski
Jakub Libosvar
virt
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-26 04:20 EDT by Avi Tal
Modified: 2016-04-22 00:59 EDT (History)
12 users (show)

See Also:
Fixed In Version: vdsm-4.9.6-29.0
Doc Type: Bug Fix
Doc Text:
Previously, it was impossible to start a virtual machine in the REST API if the data center contained an activated ISO domain. This was because the local variable 'volPath' was referenced before it was assigned. It is now possible to start a virtual machine in the REST API if the data center contains an activated ISO domain.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 14:03:45 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
vdsm log (812.77 KB, application/x-xz)
2012-07-26 04:22 EDT, Avi Tal
no flags Details
engine log (153.32 KB, application/x-compressed-tar)
2012-07-26 07:48 EDT, Avi Tal
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1508 normal SHIPPED_LIVE Important: rhev-3.1.0 vdsm security, bug fix, and enhancement update 2012-12-04 18:48:05 EST

  None (edit)
Description Avi Tal 2012-07-26 04:20:53 EDT
Description of problem:
Unable to start VM if DC contain an activated ISO domain.

Thread-102::ERROR::2012-07-26 10:54:42,386::vm::604::vm.Vm::(_startUnderlyingVm) vmId=`408f0eb9-2d7a-451d-91d4-01b0d8fd2159`::The vm start process failed
Traceback (most recent call last):
  File "/usr/share/vdsm/vm.py", line 570, in _startUnderlyingVm
    self._run()
  File "/usr/share/vdsm/libvirtvm.py", line 1294, in _run
    self.preparePaths(devices[vm.DISK_DEVICES])
  File "/usr/share/vdsm/vm.py", line 616, in preparePaths
    drive['path'] = self.cif.prepareVolumePath(drive, self.id)
  File "/usr/share/vdsm/clientIF.py", line 227, in prepareVolumePath
    self.log.info("prepared volume path: %s", volPath)
UnboundLocalError: local variable 'volPath' referenced before assignment

Steps to Reproduce:
1. attach and activate ISO domain
2. Create linux VM from template
3. start VM
  
Actual results:
Can't start due to "local variable 'volPath' referenced before assignment"
Comment 1 Avi Tal 2012-07-26 04:22:36 EDT
Created attachment 600457 [details]
vdsm log
Comment 2 Avi Tal 2012-07-26 07:46:25 EDT
This appears only when creating VM from template using REST API

More specific scenario:
1. add ISO domain
2. Create Template
3. Use REST API to create VM from template 
4. Start VM
Comment 3 Avi Tal 2012-07-26 07:48:06 EDT
Created attachment 600492 [details]
engine log
Comment 4 Eduardo Warszawski 2012-07-31 11:09:14 EDT
http://gerrit.ovirt.org/#/c/6794/

In addition, the input sent for the VM is invalid.
Note the specParams values in the drives specification.


{'index': '2', 'iface': 'ide', 'specParams': {'path': ''}, 'readonly': 'true', '
deviceId': 'f1127db3-a854-4440-94bf-f633f5d5953e', 'device': 'cdrom', 'type': 'disk'}, {'index': 0, 'iface': 'virtio', 'format': 'cow', 'bootOrder': '1', 'poolID': '92abbb7c-140e-4356-b767-fcce5bfb5907', 'volumeID': 'f7d3d58f-c6b2-4026-b
79e-dd0d6144ad29', 'imageID': '8caa461e-3460-4f7e-99d9-2b4ac73477bc', 'specParams': {}, 'readonly': 'false', 'domainID': '46f1e885-206b-4ffc-9b4b-310d637c1d62', 'optional': 'false', 'deviceId': '8caa461e-3460-4f7e-99d9-2b4ac73477bc', 'ad
dress': {'domain': '0x0000', '  slot': '0x05', '  function': '0x0', '  type': 'pci', ' bus': '0x00'}, 'device': 'disk', 'shared': 'false', 'propagateErrors': 'off', 'type': 'disk'}
Comment 7 Eduardo Warszawski 2012-08-15 12:45:09 EDT
Change-Id: I8ad50c3a3485812f57800bbe6b7318a90fe5b962
Comment 11 Zac Dover 2012-11-21 23:06:38 EST
I am adding text to the Doc Text field. However, since this bug is still ON_QA, I want to be sure that I am documenting actual behavior and not just writing science fiction.

If my Doc Text is incorrect, please alter it and needinfo me, informing me of what I missed.

Thanks in advance!
Comment 12 Jakub Libosvar 2012-11-28 08:01:49 EST
Verified with vdsm-4.9.6-44.0.el6_3.x86_64
Comment 14 errata-xmlrpc 2012-12-04 14:03:45 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

http://rhn.redhat.com/errata/RHSA-2012-1508.html

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