Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 467491

Summary: UnboundLocalError: local variable 'verr' referenced before assignment
Product: [Fedora] Fedora Reporter: James Laska <jlaska>
Component: virt-managerAssignee: Daniel Berrangé <berrange>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: berrange, crobinso, hbrock, jturner
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-10-17 19:10:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 438944    

Description James Laska 2008-10-17 18:42:18 UTC
Description of problem:

traceback creating a KVM fully virtualized x86_64 guest with LVM logical volume as disk.  Looks to be a typo 'verr' vs 'ver'?

Version-Release number of selected component (if applicable):
virt-manager-0.6.0-2.fc10.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Launch virt-manager
2. Create a KVM x86_64 fully virtualized guest
3. Select Network tree installation method
4. Choose http://download.fedora.redhat.com/pub/fedora/linux/development/x86_64/os
5. Select a LVM logical volume as the backing store (/dev/linux/vguest1), select Next
  
Actual results:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 303, in forward
    if(self.validate(notebook.get_current_page()) != True):
  File "/usr/share/virt-manager/virtManager/create.py", line 1009, in validate
    conn=self._guest.conn)
  File "/usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py", line 135, in __init__
    self.__validate_params()
  File "/usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py", line 369, in __validate_params
    self.__check_if_path_managed()
  File "/usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py", line 348, in __check_if_path_managed
    "connection: %s" % (self.path, verr))
UnboundLocalError: local variable 'verr' referenced before assignment


Expected results:

No traceback


Additional info:

Comment 1 James Laska 2008-10-17 18:45:04 UTC
Perhaps just a variable not being initialized? 

The following fix addresses the issue:

--- /usr/lib/python2.5/site-packages/virtinst/VirtualDisk.py	2008-10-17 14:44:29.000000000 -0400
+++ /tmp/fix.py	2008-10-17 14:44:25.000000000 -0400
@@ -303,6 +303,7 @@
     def __check_if_path_managed(self):
         vol = None
         err = None
+        verr = None
         pool = util.lookup_pool_by_path(self.conn,
                                         os.path.dirname(self.path))
         if pool:

Comment 2 Cole Robinson 2008-10-17 19:10:02 UTC

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