RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 843387 - VDSM: unable to start VM (UnboundLocalError: local variable 'volPath' referenced before assignment)
Summary: VDSM: unable to start VM (UnboundLocalError: local variable 'volPath' refere...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: vdsm
Version: 6.3
Hardware: x86_64
OS: Linux
high
low
Target Milestone: beta
: ---
Assignee: Eduardo Warszawski
QA Contact: Jakub Libosvar
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-26 08:20 UTC by Avi Tal
Modified: 2022-07-09 05:37 UTC (History)
12 users (show)

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.
Clone Of:
Environment:
Last Closed: 2012-12-04 19:03:45 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1508 0 normal SHIPPED_LIVE Important: rhev-3.1.0 vdsm security, bug fix, and enhancement update 2012-12-04 23:48:05 UTC

Description Avi Tal 2012-07-26 08:20:53 UTC
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 08:22:36 UTC
Created attachment 600457 [details]
vdsm log

Comment 2 Avi Tal 2012-07-26 11:46:25 UTC
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 11:48:06 UTC
Created attachment 600492 [details]
engine log

Comment 4 Eduardo Warszawski 2012-07-31 15:09:14 UTC
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 16:45:09 UTC
Change-Id: I8ad50c3a3485812f57800bbe6b7318a90fe5b962

Comment 11 Zac Dover 2012-11-22 04:06:38 UTC
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 13:01:49 UTC
Verified with vdsm-4.9.6-44.0.el6_3.x86_64

Comment 14 errata-xmlrpc 2012-12-04 19:03:45 UTC
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.